pub struct TableColumn {Show 14 fields
pub key: String,
pub title: String,
pub data_index: Option<String>,
pub width: Option<f32>,
pub align: Option<ColumnAlign>,
pub fixed: Option<ColumnFixed>,
pub sortable: bool,
pub default_sort_order: Option<SortOrder>,
pub sorter: Option<ColumnSorterFn>,
pub filters: Option<Vec<ColumnFilter>>,
pub on_filter: Option<ColumnFilterFn>,
pub render: Option<ColumnRenderFn>,
pub hidden: bool,
pub ellipsis: bool,
}Expand description
Column definition for the Table component.
Fields§
§key: String§title: String§data_index: Option<String>§width: Option<f32>§align: Option<ColumnAlign>§fixed: Option<ColumnFixed>§sortable: boolWhether this column can be sorted.
default_sort_order: Option<SortOrder>Default sort order.
sorter: Option<ColumnSorterFn>Custom sorter function.
filters: Option<Vec<ColumnFilter>>Filter options.
on_filter: Option<ColumnFilterFn>Custom filter function.
render: Option<ColumnRenderFn>Custom render function.
Whether column is hidden.
ellipsis: boolEllipsis text overflow.
Implementations§
Source§impl TableColumn
impl TableColumn
pub fn new(key: impl Into<String>, title: impl Into<String>) -> Self
Sourcepub fn data_index(self, index: impl Into<String>) -> Self
pub fn data_index(self, index: impl Into<String>) -> Self
Set data index for this column.
Sourcepub fn align(self, align: ColumnAlign) -> Self
pub fn align(self, align: ColumnAlign) -> Self
Set alignment for this column.
Sourcepub fn render(self, render: ColumnRenderFn) -> Self
pub fn render(self, render: ColumnRenderFn) -> Self
Set custom render function.
Sourcepub fn fixed(self, fixed: ColumnFixed) -> Self
pub fn fixed(self, fixed: ColumnFixed) -> Self
Set fixed position.
Trait Implementations§
Source§impl Clone for TableColumn
impl Clone for TableColumn
Source§fn clone(&self) -> TableColumn
fn clone(&self) -> TableColumn
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 moreSource§impl PartialEq for TableColumn
impl PartialEq for TableColumn
Auto Trait Implementations§
impl Freeze for TableColumn
impl RefUnwindSafe for TableColumn
impl Send for TableColumn
impl Sync for TableColumn
impl Unpin for TableColumn
impl UnwindSafe for TableColumn
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.