pub struct DataTableViewResult {
pub rows: Vec<DataTableRow>,
pub visible_columns: Vec<String>,
pub filtered_count: usize,
pub state: DataTableViewState,
pub toggle_sort: Callback<(String, bool)>,
}Expand description
What a DataTableView hands to its render callback.
Fields§
§rows: Vec<DataTableRow>Rows of the current page, in display order.
visible_columns: Vec<String>Keys of the visible columns, in column order.
filtered_count: usizeRows that match the search and filters.
state: DataTableViewStateThe current view state.
toggle_sort: Callback<(String, bool)>Activates a header: (key, multiple). A new criterion starts ascending, an existing one
reverses, and multiple keeps the other criteria.
Implementations§
Source§impl DataTableViewResult
impl DataTableViewResult
Sourcepub fn is_column_visible(&self, key: &str) -> bool
pub fn is_column_visible(&self, key: &str) -> bool
Whether a column is visible.
Sourcepub fn sort_of(&self, key: &str) -> Option<&DataTableSort>
pub fn sort_of(&self, key: &str) -> Option<&DataTableSort>
The direction a column is sorted by, if any, for aria-sort.
Trait Implementations§
Source§impl Clone for DataTableViewResult
impl Clone for DataTableViewResult
Source§impl PartialEq for DataTableViewResult
impl PartialEq for DataTableViewResult
impl StructuralPartialEq for DataTableViewResult
Auto Trait Implementations§
impl !RefUnwindSafe for DataTableViewResult
impl !Send for DataTableViewResult
impl !Sync for DataTableViewResult
impl !UnwindSafe for DataTableViewResult
impl Forget for DataTableViewResult
impl Freeze for DataTableViewResultwhere
*const u8 is !null: Freeze,
PhantomData<DataTableRow>: Freeze,
PhantomData<String>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<DataTableFilter>: Freeze,
PhantomData<(String, bool)>: Freeze,
PhantomData<DataTableSort>: Freeze,
&'static UnsyncStorage: Freeze,
NonZero<u64>: Freeze,
&'static Location<'static>: Freeze,
PhantomData<Option<ExternalListenerCallback<(String, bool), ()>>>: Freeze,
impl Move for DataTableViewResult
impl Unpin for DataTableViewResult
impl UnsafeUnpin for DataTableViewResultwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<DataTableRow>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<DataTableFilter>: UnsafeUnpin,
PhantomData<(String, bool)>: UnsafeUnpin,
PhantomData<DataTableSort>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<(String, bool), ()>>>: UnsafeUnpin,
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,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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<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 moreSource§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.