pub struct Table<M> { /* private fields */ }Expand description
Table description of a Resource’s list view declaring columns and how they map to queries.
Implementations§
Source§impl<M> Table<M>
impl<M> Table<M>
Source§impl<M> Table<M>
impl<M> Table<M>
Sourcepub fn new(cols: impl IntoColumns<M>) -> Self
pub fn new(cols: impl IntoColumns<M>) -> Self
Declare a table of cols.
Each row is keyed by its record’s primary key, which the row’s action URLs carry.
Sourcepub fn column(self, column: impl Column<M> + 'static) -> Self
pub fn column(self, column: impl Column<M> + 'static) -> Self
Append column after the declared ones.
Sourcepub fn filters(self, filters: impl IntoFilters<M>) -> Selfwhere
M: Model,
pub fn filters(self, filters: impl IntoFilters<M>) -> Selfwhere
M: Model,
Declare filters.
Sourcepub fn group_by<T>(self, lens: Lens<M, T>) -> Self
pub fn group_by<T>(self, lens: Lens<M, T>) -> Self
Offer grouping the page’s rows by the field lens reads, under the field’s name.
Sourcepub fn declaration_errors(&self) -> Vec<DeclarationErrorKind>
pub fn declaration_errors(&self) -> Vec<DeclarationErrorKind>
What is wrong with this declaration.
Sourcepub fn hide_search(self) -> Self
pub fn hide_search(self) -> Self
Render no search toolbar in the table.
Sourcepub fn hide_filter_bar(self) -> Self
pub fn hide_filter_bar(self) -> Self
Render no filter bar in the table.
Sourcepub fn live_search(self) -> Self
pub fn live_search(self) -> Self
Enable keystroke-live search via the table_search shard.
Trait Implementations§
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Table<M>
impl<M> !UnwindSafe for Table<M>
impl<M> Freeze for Table<M>
impl<M> Send for Table<M>
impl<M> Sync for Table<M>
impl<M> Unpin for Table<M>
impl<M> UnsafeUnpin for Table<M>where
Vec<Arc<dyn Column<M>>>: UnsafeUnpin,
Vec<Arc<dyn Filter<M>>>: UnsafeUnpin,
Option<GroupDef<M>>: UnsafeUnpin,
fn(&M) -> String: UnsafeUnpin,
Option<Arc<dyn Fn(&M) -> RowActions + Sync + Send>>: UnsafeUnpin,
Vec<TableAction<M>>: UnsafeUnpin,
PhantomData<M>: 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