pub struct SidebarState {
pub expand: SidebarExpandState,
pub set_tickets_open: Callback<bool>,
pub toggle_tickets: Callback<()>,
pub set_users_open: Callback<bool>,
pub toggle_users: Callback<()>,
}Expand description
Represents the shared state for the sidebar’s expandable menus.
This context struct is provided via Yew’s ContextProvider and allows child components
within the sidebar to read and modify the expansion state of the “Tickets” and “Users” menus.
§Fields
expand: The currentSidebarExpandStateholding whether each menu is open or closed.set_tickets_open: ACallback<bool>to explicitly set the open state of the “Tickets” menu.toggle_tickets: ACallback<()>to toggle the open state of the “Tickets” menu.set_users_open: ACallback<bool>to explicitly set the open state of the “Users” menu.toggle_users: ACallback<()>to toggle the open state of the “Users” menu.
Fields§
§expand: SidebarExpandState§set_tickets_open: Callback<bool>§toggle_tickets: Callback<()>§set_users_open: Callback<bool>§toggle_users: Callback<()>Implementations§
Source§impl SidebarState
impl SidebarState
Sourcefn new(
expand: SidebarExpandState,
set_tickets_open: Callback<bool>,
toggle_tickets: Callback<()>,
set_users_open: Callback<bool>,
toggle_users: Callback<()>,
) -> Self
fn new( expand: SidebarExpandState, set_tickets_open: Callback<bool>, toggle_tickets: Callback<()>, set_users_open: Callback<bool>, toggle_users: Callback<()>, ) -> Self
Creates a new SidebarState instance.
This constructor is typically used within the SidebarStateProvider to
bundle the current expansion state and its associated callbacks for context sharing.
Trait Implementations§
Source§impl Clone for SidebarState
impl Clone for SidebarState
Source§fn clone(&self) -> SidebarState
fn clone(&self) -> SidebarState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl PartialEq for SidebarState
impl PartialEq for SidebarState
impl StructuralPartialEq for SidebarState
Auto Trait Implementations§
impl Freeze for SidebarState
impl !RefUnwindSafe for SidebarState
impl !Send for SidebarState
impl !Sync for SidebarState
impl Unpin for SidebarState
impl !UnwindSafe for SidebarState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.