pub struct MultiToggle<'a, T: Clone + PartialEq> { /* private fields */ }Expand description
A multi-state toggle button that cycles through states. Each state has an icon and tooltip.
Implementations§
Source§impl<'a, T: Clone + PartialEq> MultiToggle<'a, T>
impl<'a, T: Clone + PartialEq> MultiToggle<'a, T>
Sourcepub fn new(states: &'a [MultiToggleState<'a, T>], current: &'a T) -> Self
pub fn new(states: &'a [MultiToggleState<'a, T>], current: &'a T) -> Self
Create a new multi-toggle with the given states.
Sourcepub fn style(self, style: IconButtonStyle) -> Self
pub fn style(self, style: IconButtonStyle) -> Self
Set the button style.
Auto Trait Implementations§
impl<'a, T> Freeze for MultiToggle<'a, T>
impl<'a, T> RefUnwindSafe for MultiToggle<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for MultiToggle<'a, T>where
T: Sync,
impl<'a, T> Sync for MultiToggle<'a, T>where
T: Sync,
impl<'a, T> Unpin for MultiToggle<'a, T>
impl<'a, T> UnwindSafe for MultiToggle<'a, T>where
T: RefUnwindSafe,
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