pub struct LiquidSegmentedControlScope { /* private fields */ }Expand description
The scope a segmented control’s content is declared in.
Each call adds one equal-width segment, in the order it is made, which is
also the order the indices passed to on_select count in.
Implementations§
Source§impl LiquidSegmentedControlScope
impl LiquidSegmentedControlScope
Sourcepub fn segment(&self, label: impl Into<String>)
pub fn segment(&self, label: impl Into<String>)
A segment showing label in the control’s
LiquidSegmentedStyle: the selected one is told apart by weight
and by the selected label color, never by dimming the rest.
Sourcepub fn segment_content(
&self,
description: impl Into<String>,
content: impl Fn(bool) + 'static,
)
pub fn segment_content( &self, description: impl Into<String>, content: impl Fn(bool) + 'static, )
A segment the caller draws.
selected says whether this is the active segment, so content can
respond the way the built-in label’s weight does. description is what
accessibility announces, which content alone cannot supply.
Auto Trait Implementations§
impl !RefUnwindSafe for LiquidSegmentedControlScope
impl !Send for LiquidSegmentedControlScope
impl !Sync for LiquidSegmentedControlScope
impl !UnwindSafe for LiquidSegmentedControlScope
impl Freeze for LiquidSegmentedControlScope
impl Unpin for LiquidSegmentedControlScope
impl UnsafeUnpin for LiquidSegmentedControlScope
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