pub enum Selector {
Segmented,
Toggle,
Tabs,
}Expand description
A control that picks between things.
Three, because three distinct behaviours are in play and collapsing any two loses something. A segmented control picks a value; a tab picks a pane; a toggle picks nothing and simply holds itself on or off.
Variants§
Segmented
Exactly one of N, and the options abut.
Toggle
Independent on or off, on its own.
Tabs
Navigation between panes. The folder semantic.
Implementations§
Source§impl Selector
impl Selector
Sourcepub const fn chosen(self) -> Depth
pub const fn chosen(self) -> Depth
How the chosen option sits.
Held in for a segmented control and a toggle, which is the same shape pressing produces and the whole economy of the idiom: one appearance, two reasons to wear it. A tab is the exception, because the selected folder tab comes forward to join the pane it opens.
Trait Implementations§
impl Copy for Selector
impl Eq for Selector
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnsafeUnpin for Selector
impl UnwindSafe for Selector
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