pub struct DataTableColumn { /* private fields */ }Expand description
Column schema for DataTable.
Implementations§
Source§impl DataTableColumn
impl DataTableColumn
Sourcepub fn new(
id: impl Into<SharedString>,
label: impl Into<SharedString>,
) -> DataTableColumn
pub fn new( id: impl Into<SharedString>, label: impl Into<SharedString>, ) -> DataTableColumn
Creates a column with a stable semantic id and visible header label.
Sourcepub fn alignment(self, alignment: ColumnAlignment) -> DataTableColumn
pub fn alignment(self, alignment: ColumnAlignment) -> DataTableColumn
Sets logical horizontal alignment for this column’s header and cells.
Sourcepub fn width(self, width: Pixels) -> DataTableColumn
pub fn width(self, width: Pixels) -> DataTableColumn
Sets a fixed logical width for this column. Non-finite or non-positive values are ignored.
Sourcepub fn min_width(self, width: Pixels) -> DataTableColumn
pub fn min_width(self, width: Pixels) -> DataTableColumn
Sets a minimum logical width for this column. Non-finite or negative values are ignored.
Sourcepub fn weight(self, weight: f32) -> DataTableColumn
pub fn weight(self, weight: f32) -> DataTableColumn
Sets the relative flex weight when no fixed width is specified (defaults to 1.0).
Sourcepub fn sortable(self, sortable: bool) -> DataTableColumn
pub fn sortable(self, sortable: bool) -> DataTableColumn
Marks this column header as sortable.
Sourcepub fn sort_direction(self, direction: Option<SortDirection>) -> DataTableColumn
pub fn sort_direction(self, direction: Option<SortDirection>) -> DataTableColumn
Sets the current controlled SortDirection indicator for this column.
Passing Some(_) also marks the column sortable.
Sourcepub fn disabled(self, disabled: bool) -> DataTableColumn
pub fn disabled(self, disabled: bool) -> DataTableColumn
Disables header sorting interaction for this column when true.
Sourcepub fn id(&self) -> &SharedString
pub fn id(&self) -> &SharedString
Returns the column identifier.
Sourcepub fn label(&self) -> &SharedString
pub fn label(&self) -> &SharedString
Returns the column header label.
Trait Implementations§
Source§impl Clone for DataTableColumn
impl Clone for DataTableColumn
Source§fn clone(&self) -> DataTableColumn
fn clone(&self) -> DataTableColumn
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataTableColumn
impl Debug for DataTableColumn
Source§impl PartialEq for DataTableColumn
impl PartialEq for DataTableColumn
impl StructuralPartialEq for DataTableColumn
Auto Trait Implementations§
impl Forget for DataTableColumn
impl Freeze for DataTableColumn
impl Move for DataTableColumn
impl RefUnwindSafe for DataTableColumn
impl Send for DataTableColumn
impl Sync for DataTableColumn
impl Unpin for DataTableColumn
impl UnsafeUnpin for DataTableColumnwhere
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
impl UnwindSafe for DataTableColumn
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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