Skip to main content

ListRowProps

Struct ListRowProps 

pub struct ListRowProps {
Show 22 fields pub key: String, pub title: String, pub prefix: Option<String>, pub item: Option<ResourceId>, pub secondary: Option<String>, pub note: Option<String>, pub meta: Option<String>, pub meta_tone: Tone, pub value: Option<String>, pub badge: Option<String>, pub mark: Option<Icon>, pub tone: Tone, pub icon: Option<Icon>, pub selected: bool, pub avatar: Option<AvatarProps>, pub trailing: Option<Box<dyn Widget>>, pub checkbox: Option<Bound<bool>>, pub check: Event, pub motion: Option<Feel>, pub dense: bool, pub activate: Event, pub quiet: bool,
}
Expand description

A row of a list: what an item is, in one line, with the start of its content under it and a quiet fact on its trailing edge. Pressing it activates it: a list opens what it shows.

Fields§

§key: String

The row’s stable key: selection, focus and motion follow it.

§title: String

What the item is: its title. A row that names none shows its item’s.

§prefix: Option<String>

A quiet word before the title, on the same line and in the weaker ink: where an item came from, what it answers. The title shares its line, so a row that says one takes the room left after it.

§item: Option<ResourceId>

The resource the row shows, which activating the row opens.

§secondary: Option<String>

The line under the title: the start of the item’s content, the last message.

§note: Option<String>

A line of the row’s own under its text: what waits on the item and is not its content, as a proposal about it reads (“Suggested: move this to the end”). One line, elided; empty shows nothing.

§meta: Option<String>

When it happened or is due: the first fact of the row’s facts column.

§meta_tone: Tone

The tone the trailing fact reads in, where the item it states has one: a day gone by is overdue. The UI host reads it off the day itself, as the one presenter gives it.

§value: Option<String>

The item’s figure among its facts, as a setting shows it.

§badge: Option<String>

A short code in the leading column: a method, a kind.

§mark: Option<Icon>

A mark on the row’s edge, after every other fact: pinned, starred, an item’s priority.

§tone: Tone

The tone the mark and the row’s checkbox ring read in: the item’s priority, a theme role rather than a colour. Neutral draws them as the row’s quiet ink.

§icon: Option<Icon>

A glyph in the leading column: what kind of item it is.

§selected: bool

Whether the row is selected in its list.

§avatar: Option<AvatarProps>

Who the item is: their face among its facts, between when it is due and how far it has got.

§trailing: Option<Box<dyn Widget>>

A control on the trailing edge, which moves under the text when the row is narrow.

§checkbox: Option<Bound<bool>>

A checkbox in the leading column, bound to whether the item is done. A press on it asks the row’s check, when it names one, instead of changing what it is bound to.

§check: Event

The checkbox was pressed: what a check is, in the app’s words. A task and every step under it are done in one thing to undo; with no check, a press changes the bound value.

§motion: Option<Feel>

The pace the row’s own motion plays at: its mark coming and going, and the row arriving, leaving and changing places in its list. Unset, the theme’s.

§dense: bool

The row stands dense: one quiet line at the caption’s size with the small glyph, as tall as that line and its inset, for a reference under content rather than a list of items.

§activate: Event

The row was activated (a click, Enter, an assistive technology): open what it shows.

§quiet: bool

The row reads as subordinate to the rows around it: its title in the weaker ink, as an outline’s quieter branch does.

Implementations§

§

impl ListRowProps

pub fn reusable(&self) -> Option<ListRowProps>

The props again, for a list that builds the row anew each time it scrolls into view: None for a row with a trailing control, which is built once.

Trait Implementations§

§

impl Component for ListRowProps

§

const NAME: &'static str = "ListRow"

The component’s name, as code calls it.
§

fn describe() -> Description

§

fn from_source(source: &mut dyn Source) -> Result<ListRowProps, Error>

The props source gives. Read more
§

impl Default for ListRowProps

§

fn default() -> ListRowProps

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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
§

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

§

fn as_any(&self) -> &(dyn Any + 'static)

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
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

§

fn null_value() -> T

The none-equivalent value.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

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

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

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