pub struct SettingRow<Msg> { /* private fields */ }Expand description
One setting of a SettingsList: a label, an optional description and the control added
with SettingsRows::row.
Implementations§
Source§impl<Msg> SettingRow<Msg>
impl<Msg> SettingRow<Msg>
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
A faint note under the label, wrapped over as many lines as it needs.
Sourcepub fn disabled(self, disabled: bool) -> Self
pub fn disabled(self, disabled: bool) -> Self
Greys the row out; the keyboard skips it. Disable its control as well.
Sourcepub fn nested(self, nested: bool) -> Self
pub fn nested(self, nested: bool) -> Self
Marks the row as part of the row above it, such as a choice that qualifies that setting: its label and description start two cells further in. The pillar and the control stay where every row has them, and the keys reach it as any other row.
Sourcepub fn on_activate(self, message: Msg) -> Self
pub fn on_activate(self, message: Msg) -> Self
Message for Enter or Space on the row when its control does not use the key, or for a click on the label; for rows that open something, such as a detail page.
Auto Trait Implementations§
impl<Msg> Freeze for SettingRow<Msg>
impl<Msg> RefUnwindSafe for SettingRow<Msg>where
Option<Msg>: RefUnwindSafe,
impl<Msg> Send for SettingRow<Msg>
impl<Msg> Sync for SettingRow<Msg>
impl<Msg> Unpin for SettingRow<Msg>
impl<Msg> UnsafeUnpin for SettingRow<Msg>where
Option<Msg>: UnsafeUnpin,
impl<Msg> UnwindSafe for SettingRow<Msg>where
Option<Msg>: UnwindSafe,
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
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 more