pub struct SidebarToggleButton { /* private fields */ }Expand description
Toggle button to collapse/expand the Sidebar.
Implementations§
Source§impl SidebarToggleButton
impl SidebarToggleButton
Sourcepub fn side(self, side: Side) -> Self
pub fn side(self, side: Side) -> Self
Set the side of the toggle button.
Default is Side::Left.
Sourcepub fn accessibility_label(self, label: impl Into<SharedString>) -> Self
pub fn accessibility_label(self, label: impl Into<SharedString>) -> Self
Set the accessibility label of the toggle button.
The default toggle is icon-only; without an explicit label it has no accessible name.
Trait Implementations§
Source§impl IntoElement for SidebarToggleButton
impl IntoElement for SidebarToggleButton
Source§type Element = ViewElement<SidebarToggleButton>
type Element = ViewElement<SidebarToggleButton>
The specific type of element into which the implementing type is converted.
Useful for converting other types into elements automatically, like Strings
Source§fn into_element(self) -> Self::Element
fn into_element(self) -> Self::Element
Convert self into a type that implements
Element.Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
Convert self into a dynamically-typed
AnyElement.Source§impl RenderOnce for SidebarToggleButton
impl RenderOnce for SidebarToggleButton
Source§fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement
Render this component into an element tree. Note that this method
takes ownership of self, as compared to
Render::render() method
which takes a mutable reference.Auto Trait Implementations§
impl !RefUnwindSafe for SidebarToggleButton
impl !Send for SidebarToggleButton
impl !Sync for SidebarToggleButton
impl !UnwindSafe for SidebarToggleButton
impl Forget for SidebarToggleButton
impl Freeze for SidebarToggleButtonwhere
NonZero<u32>: Freeze,
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<Path> is !null: Freeze,
PhantomData<ArcInner<Path>>: Freeze,
*const str is !null: Freeze,
PhantomData<&'static str>: Freeze,
*const ArcInner<ElementId> is !null: Freeze,
PhantomData<ArcInner<ElementId>>: Freeze,
*mut Interactivity: Freeze,
*const RcInner<Cell<bool>> is !null: Freeze,
PhantomData<RcInner<Cell<bool>>>: Freeze,
*const Interactivity is !null: Freeze,
PhantomData<Interactivity>: Freeze,
*mut dyn ElementObject: Freeze,
*const AnyElement is !null: Freeze,
PhantomData<AnyElement>: Freeze,
*const dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App) is !null: Freeze,
PhantomData<dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App)>: Freeze,
*const dyn ImageCacheProvider is !null: Freeze,
PhantomData<dyn ImageCacheProvider>: Freeze,
*const dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]> is !null: Freeze,
PhantomData<dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<BoxShadow>: Freeze,
*const ArcInner<Vec<(String, u32)>> is !null: Freeze,
PhantomData<ArcInner<Vec<(String, u32)>>>: Freeze,
*const ArcInner<Vec<String>> is !null: Freeze,
PhantomData<ArcInner<Vec<String>>>: Freeze,
*const RcInner<dyn Fn(&ClickEvent, &mut Window, &mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&ClickEvent, &mut Window, &mut App)>>: Freeze,
*const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: Freeze,
PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: Freeze,
*const ArcInner<[u8]> is !null: Freeze,
PhantomData<ArcInner<[u8]>>: Freeze,
*const dyn Fn(f32) -> f32 is !null: Freeze,
PhantomData<dyn Fn(f32) -> f32>: Freeze,
*const RcInner<Box<dyn Action>> is !null: Freeze,
PhantomData<RcInner<Box<dyn Action>>>: Freeze,
*const RcInner<dyn Fn(&mut Window, &mut App) -> AnyView> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut Window, &mut App) -> AnyView>>: Freeze,
*const RcInner<dyn Fn(&bool, &mut Window, &mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&bool, &mut Window, &mut App)>>: Freeze,
impl Move for SidebarToggleButton
impl Unpin for SidebarToggleButtonwhere
NonZero<u32>: Unpin,
&'static str: Unpin,
Arc<str>: Unpin,
Arc<Path>: Unpin,
*const str is !null: Unpin,
Arc<ElementId>: Unpin,
*mut Interactivity: Unpin,
Rc<Cell<bool>>: Unpin,
Box<Interactivity>: Unpin,
*mut dyn ElementObject: Unpin,
*const AnyElement is !null: Unpin,
AnyElement: Unpin,
Box<dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App)>: Unpin,
Box<dyn ImageCacheProvider>: Unpin,
Box<dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]>>: Unpin,
*const u8 is !null: Unpin,
Arc<Vec<(String, u32)>>: Unpin,
Arc<Vec<String>>: Unpin,
Rc<dyn Fn(&ClickEvent, &mut Window, &mut App)>: Unpin,
Arc<RwLock<RawRwLock, FocusMap>>: Unpin,
Arc<[u8]>: Unpin,
Box<dyn Fn(f32) -> f32>: Unpin,
Rc<Box<dyn Action>>: Unpin,
Rc<dyn Fn(&mut Window, &mut App) -> AnyView>: Unpin,
Rc<dyn Fn(&bool, &mut Window, &mut App)>: Unpin,
impl UnsafeUnpin for SidebarToggleButtonwhere
NonZeroU32Inner: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<Path> is !null: UnsafeUnpin,
PhantomData<ArcInner<Path>>: UnsafeUnpin,
*const str is !null: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
*const ArcInner<ElementId> is !null: UnsafeUnpin,
PhantomData<ArcInner<ElementId>>: UnsafeUnpin,
*mut Interactivity: UnsafeUnpin,
*const RcInner<Cell<bool>> is !null: UnsafeUnpin,
PhantomData<RcInner<Cell<bool>>>: UnsafeUnpin,
*const Interactivity is !null: UnsafeUnpin,
PhantomData<Interactivity>: UnsafeUnpin,
*mut dyn ElementObject: UnsafeUnpin,
*const AnyElement is !null: UnsafeUnpin,
PhantomData<AnyElement>: UnsafeUnpin,
*const dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App) is !null: UnsafeUnpin,
PhantomData<dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App)>: UnsafeUnpin,
*const dyn ImageCacheProvider is !null: UnsafeUnpin,
PhantomData<dyn ImageCacheProvider>: UnsafeUnpin,
*const dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]> is !null: UnsafeUnpin,
PhantomData<dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<BoxShadow>: UnsafeUnpin,
*const ArcInner<Vec<(String, u32)>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<(String, u32)>>>: UnsafeUnpin,
*const ArcInner<Vec<String>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<String>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&ClickEvent, &mut Window, &mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&ClickEvent, &mut Window, &mut App)>>: UnsafeUnpin,
*const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: UnsafeUnpin,
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
*const dyn Fn(f32) -> f32 is !null: UnsafeUnpin,
PhantomData<dyn Fn(f32) -> f32>: UnsafeUnpin,
*const RcInner<Box<dyn Action>> is !null: UnsafeUnpin,
PhantomData<RcInner<Box<dyn Action>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut Window, &mut App) -> AnyView> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut Window, &mut App) -> AnyView>>: UnsafeUnpin,
*const RcInner<dyn Fn(&bool, &mut Window, &mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&bool, &mut Window, &mut App)>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
Source§fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Render this component or element with an animation
Source§fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Render this component or element with a chain of animations
Source§fn with_spring<T>(
self,
id: impl Into<ElementId>,
animation: SpringAnimation<T>,
animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static,
) -> SpringAnimationElement<Self>
fn with_spring<T>( self, id: impl Into<ElementId>, animation: SpringAnimation<T>, animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static, ) -> SpringAnimationElement<Self>
Renders this component or element at the value produced by a spring. Read more
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FluentBuilder for Twhere
T: IntoElement,
impl<T> FluentBuilder for Twhere
T: IntoElement,
Source§fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
Imperatively modify self with the given closure.
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
Conditionally modify self with the given closure.
Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
Conditionally modify self with the given closure.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<E> TestTextExt for Ewhere
E: IntoElement,
impl<E> TestTextExt for Ewhere
E: IntoElement,
Source§fn test_text(self, text: impl Into<SharedString>) -> Self::Element
fn test_text(self, text: impl Into<SharedString>) -> Self::Element
With
test-support, records text each time the element paints.
Otherwise returns the element it builds.Source§fn test_alt_text(self, text: impl Into<SharedString>) -> Self::Element
fn test_alt_text(self, text: impl Into<SharedString>) -> Self::Element
Like
Self::test_text for an image’s alternative text, which
stands in for what the element draws.