pub struct SortingState { /* private fields */ }Expand description
Complete sorting state for the table.
Tracks all active column sorts and their configuration, supporting multi-column sorting with configurable limits.
Implementations§
Source§impl SortingState
impl SortingState
Sourcepub fn new() -> SortingState
pub fn new() -> SortingState
Creates a new empty sorting state.
§Returns
SortingState: A new empty sorting state with multi-sort and sort removal enabled.
Sourcepub fn with_sorts(sorts: Vec<SortState>) -> SortingState
pub fn with_sorts(sorts: Vec<SortState>) -> SortingState
Sourcepub fn with_max_multi_sort_columns(self, max: usize) -> SortingState
pub fn with_max_multi_sort_columns(self, max: usize) -> SortingState
Sourcepub fn with_multi_sort(self, enable: bool) -> SortingState
pub fn with_multi_sort(self, enable: bool) -> SortingState
Sourcepub fn with_sort_removal(self, enable: bool) -> SortingState
pub fn with_sort_removal(self, enable: bool) -> SortingState
Sourcepub fn get_sort_index(&self, column_id: &ColumnId) -> Option<usize>
pub fn get_sort_index(&self, column_id: &ColumnId) -> Option<usize>
Sourcepub fn get_direction(&self, column_id: &ColumnId) -> Option<SortDirection>
pub fn get_direction(&self, column_id: &ColumnId) -> Option<SortDirection>
Sourcepub fn toggle_sort(&mut self, column_id: impl Into<ColumnId>, multi: bool)
pub fn toggle_sort(&mut self, column_id: impl Into<ColumnId>, multi: bool)
Toggles sorting for a column.
If multi is true and multi-sort is enabled, adds to the sort list. Otherwise, replaces the current sort.
§Parameters
column_id: The column identifier to toggle sorting for.multi: Whether to add to multi-sort list (true) or replace (false).
Sourcepub fn set_sort(
&mut self,
column_id: impl Into<ColumnId>,
direction: SortDirection,
)
pub fn set_sort( &mut self, column_id: impl Into<ColumnId>, direction: SortDirection, )
Sets the sort for a column directly.
§Parameters
column_id: The column identifier.direction: The sort direction to set.
Sourcepub fn clear_sort(&mut self, column_id: &ColumnId)
pub fn clear_sort(&mut self, column_id: &ColumnId)
Clears the sort for a specific column.
§Parameters
column_id: The column identifier to clear sorting for.
Trait Implementations§
Source§impl Clone for SortingState
impl Clone for SortingState
Source§fn clone(&self) -> SortingState
fn clone(&self) -> SortingState
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 Debug for SortingState
impl Debug for SortingState
Source§impl Default for SortingState
impl Default for SortingState
Source§fn default() -> SortingState
fn default() -> SortingState
Returns the “default value” for a type. Read more
Source§impl PartialEq for SortingState
impl PartialEq for SortingState
impl Eq for SortingState
impl StructuralPartialEq for SortingState
Auto Trait Implementations§
impl Freeze for SortingState
impl RefUnwindSafe for SortingState
impl Send for SortingState
impl Sync for SortingState
impl Unpin for SortingState
impl UnsafeUnpin for SortingState
impl UnwindSafe for SortingState
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.