pub struct DataTableRow { /* private fields */ }Expand description
One data row inside a DataTable.
Implementations§
Source§impl DataTableRow
impl DataTableRow
Sourcepub fn new(
id: impl Into<SharedString>,
cells: impl IntoIterator<Item = impl Into<DataTableCell>>,
) -> DataTableRow
pub fn new( id: impl Into<SharedString>, cells: impl IntoIterator<Item = impl Into<DataTableCell>>, ) -> DataTableRow
Creates a row with a stable id and cell values corresponding to the table columns.
Sourcepub fn selected(self, selected: bool) -> DataTableRow
pub fn selected(self, selected: bool) -> DataTableRow
Marks the row as selected using SecondaryContainer / OnSecondaryContainer styling.
Sourcepub fn disabled(self, disabled: bool) -> DataTableRow
pub fn disabled(self, disabled: bool) -> DataTableRow
Disables row selection, focus, and activation when true.
Sourcepub fn accessible_label(self, label: impl Into<SharedString>) -> DataTableRow
pub fn accessible_label(self, label: impl Into<SharedString>) -> DataTableRow
Sets an explicit accessible name for the row.
Sourcepub fn on_activate(
self,
handler: impl Fn(&mut Window, &mut App) + 'static,
) -> DataTableRow
pub fn on_activate( self, handler: impl Fn(&mut Window, &mut App) + 'static, ) -> DataTableRow
Registers a row-specific activation callback invoked on pointer click or Enter/Space.
Sourcepub fn track_focus(self, focus: &FocusHandle) -> DataTableRow
pub fn track_focus(self, focus: &FocusHandle) -> DataTableRow
Attaches a caller-owned FocusHandle to this row when interactive.
Auto Trait Implementations§
impl !RefUnwindSafe for DataTableRow
impl !Send for DataTableRow
impl !Sync for DataTableRow
impl !UnwindSafe for DataTableRow
impl Forget for DataTableRow
impl Freeze for DataTableRowwhere
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<DataTableCell>: Freeze,
*const RcInner<dyn Fn(&mut Window, &mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut Window, &mut App)>>: Freeze,
NonZero<u32>: Freeze,
*const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: Freeze,
PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: Freeze,
impl Move for DataTableRow
impl Unpin for DataTableRow
impl UnsafeUnpin for DataTableRowwhere
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<DataTableCell>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut Window, &mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut Window, &mut App)>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
*const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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