pub enum ColumnToggle {
Fixed,
ShownByDefault,
HiddenByDefault,
}Expand description
Whether each reader may hide a Column from their list, and whether it starts shown.
A list with a toggleable column renders a Columns menu in its toolbar, whose Apply keeps the
checked columns and Reset restores the defaults. A panel keeps each signed-in user’s choice per
resource, in the ColumnPreference model, so the relation
tables over a resource show what its list shows; a column added later, or whose default changes,
takes its default until the reader picks otherwise. Search, sort and export still read every
column. A panel without auth, and a table a page renders with
wired_table, render no menu and show the defaults.
use tablo_core::{TextColumn, lens};
TextColumn::new(lens!(Post.title)).toggleable();
TextColumn::new(lens!(Post.slug)).hidden_by_default();Variants§
Fixed
Always shown.
ShownByDefault
Shown until the reader hides it: toggleable().
HiddenByDefault
Hidden until the reader shows it: hidden_by_default().
Trait Implementations§
Source§impl Clone for ColumnToggle
impl Clone for ColumnToggle
impl Copy for ColumnToggle
Source§impl Debug for ColumnToggle
impl Debug for ColumnToggle
Source§impl Default for ColumnToggle
impl Default for ColumnToggle
impl Eq for ColumnToggle
Source§impl PartialEq for ColumnToggle
impl PartialEq for ColumnToggle
impl StructuralPartialEq for ColumnToggle
Auto Trait Implementations§
impl Forget for ColumnToggle
impl Freeze for ColumnToggle
impl RefUnwindSafe for ColumnToggle
impl Send for ColumnToggle
impl Sync for ColumnToggle
impl Unpin for ColumnToggle
impl UnsafeUnpin for ColumnToggle
impl UnwindSafe for ColumnToggle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.