Skip to main content

Row

Struct Row 

Source
pub struct Row { /* private fields */ }
Expand description

One row of a section (docs/settings.md), built by the row constructors.

Implementations§

Source§

impl Row

Source

pub fn segmented(self) -> Self

Present a choice as a segmented control.

Source

pub fn step(self, s: f64) -> Self

A slider’s or stepper’s step.

Source

pub fn value_text(self, f: impl Fn(f64) -> String + 'static) -> Self

A slider’s value label, shown beside the control.

Source

pub fn placeholder<M>(self, t: impl IntoText<M>) -> Self

A text row’s placeholder.

Source

pub fn secure(self) -> Self

A text row that hides its characters.

Source

pub fn destructive(self) -> Self

An action drawn as destructive (red where the platform has a red).

Source

pub fn confirm<M>(self, message: impl IntoText<M>) -> Self

An action that asks first: a confirm dialog with message, destructive when the row is.

Source

pub fn confirm_label<M>(self, label: impl IntoText<M>) -> Self

The confirm dialog’s own button label (“Reset” rather than the generic OK).

Source

pub fn busy<M>(self, busy: impl IntoReactive<bool, M>) -> Self

An action that shows a spinner and disables while this reads true: a Signal<bool> or a closure.

Source

pub fn copyable(self) -> Self

An info row with a copy affordance.

Source§

impl Row

Source

pub fn title<M>(self, t: impl IntoText<M>) -> Self

The row’s title (every row constructor takes one, this replaces it).

Source

pub fn caption<M>(self, t: impl IntoText<M>) -> Self

A secondary line under the title.

Source

pub fn id(self, id: ElementId) -> Self

The element id of the row’s control (default pref-<key> for a pref row).

Source

pub fn enabled<M>(self, enabled: impl IntoReactive<bool, M>) -> Self

Gray the control out while this reads false: a Signal<bool>, or a derived condition (|| !INCOGNITO.get()), tracked like any reactive read.

Source

pub fn available(self, f: impl Fn() -> bool + 'static) -> Self

Omit the row when false.

Source

pub fn requires(self, cap: Cap) -> Self

Omit the row unless the toolkit supports cap.

Trait Implementations§

Source§

impl Clone for Row

Source§

fn clone(&self) -> Row

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Row

§

impl !Send for Row

§

impl !Sync for Row

§

impl !UnwindSafe for Row

§

impl Freeze for Row

§

impl Unpin for Row

§

impl UnsafeUnpin for Row

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoReactive<T, StaticMark> for T
where T: Clone + 'static,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.