pub struct FilterState { /* private fields */ }Expand description
Complete filtering state for the table.
Aggregates column-specific filters and the global filter into a single manageable state structure.
Implementations§
Source§impl FilterState
impl FilterState
Sourcepub fn new() -> FilterState
pub fn new() -> FilterState
Creates a new empty filter state.
§Returns
FilterState: A new empty filter state with case-insensitive defaults.
Sourcepub fn with_case_sensitive(self, case_sensitive: bool) -> FilterState
pub fn with_case_sensitive(self, case_sensitive: bool) -> FilterState
Sourcepub fn column_filters(&self) -> &HashMap<ColumnId, ColumnFilter>
pub fn column_filters(&self) -> &HashMap<ColumnId, ColumnFilter>
Returns the column filters.
§Returns
&HashMap<ColumnId, ColumnFilter>: A reference to the column filter map.
Sourcepub fn global_filter(&self) -> &GlobalFilter
pub fn global_filter(&self) -> &GlobalFilter
Sourcepub fn is_case_sensitive(&self) -> bool
pub fn is_case_sensitive(&self) -> bool
Returns whether filtering is case-sensitive.
§Returns
bool: Whether case-sensitive filtering is enabled.
Sourcepub fn is_filtered(&self) -> bool
pub fn is_filtered(&self) -> bool
Returns whether any filtering is active.
§Returns
bool: Whether any column or global filter is active.
Sourcepub fn get_column_filter(&self, column_id: &ColumnId) -> Option<&ColumnFilter>
pub fn get_column_filter(&self, column_id: &ColumnId) -> Option<&ColumnFilter>
Sourcepub fn set_column_filter(&mut self, filter: ColumnFilter)
pub fn set_column_filter(&mut self, filter: ColumnFilter)
Sourcepub fn set_text_filter(
&mut self,
column_id: impl Into<ColumnId>,
value: impl Into<String>,
)
pub fn set_text_filter( &mut self, column_id: impl Into<ColumnId>, value: impl Into<String>, )
Sets a text filter for a column.
§Parameters
column_id: The column identifier.value: The text value to filter by.
Sourcepub fn clear_column_filter(&mut self, column_id: &ColumnId)
pub fn clear_column_filter(&mut self, column_id: &ColumnId)
Sourcepub fn clear_all_column_filters(&mut self)
pub fn clear_all_column_filters(&mut self)
Clears all column filters.
Sourcepub fn set_global_filter(&mut self, value: impl Into<String>)
pub fn set_global_filter(&mut self, value: impl Into<String>)
Sourcepub fn clear_global_filter(&mut self)
pub fn clear_global_filter(&mut self)
Clears the global filter.
Trait Implementations§
Source§impl Clone for FilterState
impl Clone for FilterState
Source§fn clone(&self) -> FilterState
fn clone(&self) -> FilterState
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 FilterState
impl Debug for FilterState
Source§impl Default for FilterState
impl Default for FilterState
Source§fn default() -> FilterState
fn default() -> FilterState
Returns the “default value” for a type. Read more
Source§impl PartialEq for FilterState
impl PartialEq for FilterState
impl StructuralPartialEq for FilterState
Auto Trait Implementations§
impl Freeze for FilterState
impl RefUnwindSafe for FilterState
impl Send for FilterState
impl Sync for FilterState
impl Unpin for FilterState
impl UnsafeUnpin for FilterState
impl UnwindSafe for FilterState
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> 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.