pub struct SidebarState { /* private fields */ }Expand description
Whether a Sidebar is open, shared with whatever toggles it.
A sidebar narrower windows show as a sheet keeps that apart: closing the sheet does not change what the sidebar does when the window grows again.
Implementations§
Source§impl SidebarState
impl SidebarState
Sourcepub fn new(open: bool) -> SidebarState
pub fn new(open: bool) -> SidebarState
A state that starts open or closed.
Sourcepub fn controlled(open: Binding<bool>) -> SidebarState
pub fn controlled(open: Binding<bool>) -> SidebarState
A state read from and written to open, for an app that saves or drives it.
Sourcepub fn is_open(&self) -> bool
pub fn is_open(&self) -> bool
Whether the sidebar is showing: its sheet in a narrow window, otherwise the column at full width.
Sourcepub fn is_narrow(&self) -> bool
pub fn is_narrow(&self) -> bool
The window is narrow enough for this sidebar to be a sheet; see
Sidebar::narrow_below. Known once the sidebar has been built.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SidebarState
impl !Send for SidebarState
impl !Sync for SidebarState
impl !UnwindSafe for SidebarState
impl Freeze for SidebarState
impl Unpin for SidebarState
impl UnsafeUnpin for SidebarState
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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