pub struct SortableItem {
pub id: String,
pub title: String,
pub subtitle: Option<String>,
pub icon: Option<String>,
pub status: Option<SortableStatus>,
}Expand description
One row in a SortableList.
Fields§
§id: StringStable identifier — used as the row id for hit testing and as the caller-facing way to look up which item moved.
title: StringPrimary label.
subtitle: Option<String>Optional secondary line below the title.
icon: Option<String>Optional leading glyph rendered in a small rounded box.
status: Option<SortableStatus>Optional trailing status pill.
Implementations§
Source§impl SortableItem
impl SortableItem
Sourcepub fn new(id: impl Into<String>, title: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, title: impl Into<String>) -> Self
Create an item with a stable id and title.
Sourcepub fn subtitle(self, subtitle: impl Into<String>) -> Self
pub fn subtitle(self, subtitle: impl Into<String>) -> Self
Set the secondary line below the title.
Trait Implementations§
Source§impl Clone for SortableItem
impl Clone for SortableItem
Source§fn clone(&self) -> SortableItem
fn clone(&self) -> SortableItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SortableItem
impl RefUnwindSafe for SortableItem
impl Send for SortableItem
impl Sync for SortableItem
impl Unpin for SortableItem
impl UnsafeUnpin for SortableItem
impl UnwindSafe for SortableItem
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