pub struct GroupingState { /* private fields */ }Expand description
Complete grouping state for the table.
Tracks which columns are used for grouping and provides configuration for aggregation and expansion behavior.
Implementations§
Source§impl GroupingState
impl GroupingState
Sourcepub fn new() -> GroupingState
pub fn new() -> GroupingState
Creates a new empty grouping state.
§Returns
GroupingState: A new grouping state with no groups configured.
Sourcepub fn with_columns(columns: Vec<ColumnId>) -> GroupingState
pub fn with_columns(columns: Vec<ColumnId>) -> GroupingState
Sourcepub fn with_enabled(self, enabled: bool) -> GroupingState
pub fn with_enabled(self, enabled: bool) -> GroupingState
Sourcepub fn with_aggregation(self, show: bool) -> GroupingState
pub fn with_aggregation(self, show: bool) -> GroupingState
Sourcepub fn with_expand_by_default(self, expand: bool) -> GroupingState
pub fn with_expand_by_default(self, expand: bool) -> GroupingState
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Sourcepub fn is_grouped(&self) -> bool
pub fn is_grouped(&self) -> bool
Returns whether any grouping is active.
§Returns
bool: Whether grouping is enabled and columns are configured.
Sourcepub fn group_by(&self) -> &[ColumnId]
pub fn group_by(&self) -> &[ColumnId]
Returns the group-by columns.
§Returns
&[ColumnId]: A slice of column identifiers used for grouping.
Sourcepub fn show_aggregation(&self) -> bool
pub fn show_aggregation(&self) -> bool
Returns whether aggregation should be shown.
§Returns
bool: Whether aggregated values are displayed.
Sourcepub fn expand_by_default(&self) -> bool
pub fn expand_by_default(&self) -> bool
Returns whether groups should expand by default.
§Returns
bool: Whether groups start in expanded state.
Sourcepub fn depth(&self) -> usize
pub fn depth(&self) -> usize
Returns the grouping depth (number of group-by columns).
§Returns
usize: The number of grouping levels.
Sourcepub fn is_grouped_by(&self, column_id: &ColumnId) -> bool
pub fn is_grouped_by(&self, column_id: &ColumnId) -> bool
Sourcepub fn get_group_index(&self, column_id: &ColumnId) -> Option<usize>
pub fn get_group_index(&self, column_id: &ColumnId) -> Option<usize>
Sourcepub fn remove_group(&mut self, column_id: &ColumnId)
pub fn remove_group(&mut self, column_id: &ColumnId)
Sourcepub fn toggle_group(&mut self, column_id: ColumnId)
pub fn toggle_group(&mut self, column_id: ColumnId)
Sourcepub fn set_group_by(&mut self, columns: Vec<ColumnId>)
pub fn set_group_by(&mut self, columns: Vec<ColumnId>)
Sourcepub fn move_group(&mut self, column_id: &ColumnId, to_index: usize)
pub fn move_group(&mut self, column_id: &ColumnId, to_index: usize)
Moves a group column to a new index.
§Parameters
column_id: The column identifier to move.to_index: The target index.
Trait Implementations§
Source§impl Clone for GroupingState
impl Clone for GroupingState
Source§fn clone(&self) -> GroupingState
fn clone(&self) -> GroupingState
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 GroupingState
impl Debug for GroupingState
Source§impl Default for GroupingState
impl Default for GroupingState
Source§fn default() -> GroupingState
fn default() -> GroupingState
Returns the “default value” for a type. Read more
Source§impl PartialEq for GroupingState
impl PartialEq for GroupingState
impl Eq for GroupingState
impl StructuralPartialEq for GroupingState
Auto Trait Implementations§
impl Freeze for GroupingState
impl RefUnwindSafe for GroupingState
impl Send for GroupingState
impl Sync for GroupingState
impl Unpin for GroupingState
impl UnsafeUnpin for GroupingState
impl UnwindSafe for GroupingState
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.