pub struct BooleanColumn<M> { /* private fields */ }Expand description
A column of a bool field rendered as an icon.
tablo_core::BooleanColumn::new(tablo_core::lens!(Post.featured)).sortable();Implementations§
Source§impl<M> BooleanColumn<M>where
M: Model,
impl<M> BooleanColumn<M>where
M: Model,
Sourcepub fn new(lens: Lens<M, bool>) -> BooleanColumn<M>
pub fn new(lens: Lens<M, bool>) -> BooleanColumn<M>
Bind the column to the bool field lens reads.
Sourcepub fn label(self, label: impl Into<Text>) -> BooleanColumn<M>
pub fn label(self, label: impl Into<Text>) -> BooleanColumn<M>
Replace the label the field’s name gives it.
Sourcepub fn width(self, width: ColumnWidth) -> BooleanColumn<M>
pub fn width(self, width: ColumnWidth) -> BooleanColumn<M>
Declare this column’s width.
Sourcepub fn toggleable(self) -> BooleanColumn<M>
pub fn toggleable(self) -> BooleanColumn<M>
Let each reader hide this column from their list; it starts shown.
Let each reader show this column in their list; it starts hidden.
Sourcepub fn sortable(self) -> BooleanColumn<M>
pub fn sortable(self) -> BooleanColumn<M>
Make the header a sort link.
Trait Implementations§
Source§impl<M> Clone for BooleanColumn<M>
impl<M> Clone for BooleanColumn<M>
Source§fn clone(&self) -> BooleanColumn<M>
fn clone(&self) -> BooleanColumn<M>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<M> Column<M> for BooleanColumn<M>
impl<M> Column<M> for BooleanColumn<M>
Source§fn column_width(&self) -> ColumnWidth
fn column_width(&self) -> ColumnWidth
The width the column claims.
Source§fn toggle(&self) -> ColumnToggle
fn toggle(&self) -> ColumnToggle
Whether each reader may hide or show the column in their list, and how it starts. A
detail page shows every column.
Source§fn order_by(&self, descending: bool) -> Option<OrderByExpr>
fn order_by(&self, descending: bool) -> Option<OrderByExpr>
The ordering a sort on this column applies, or
None when the header does not link to a
sort on it. A sortable column answers Some either way.Source§impl<M> Debug for BooleanColumn<M>
impl<M> Debug for BooleanColumn<M>
Source§impl<M> IntoColumns<M> for BooleanColumn<M>where
BooleanColumn<M>: Column<M> + 'static,
impl<M> IntoColumns<M> for BooleanColumn<M>where
BooleanColumn<M>: Column<M> + 'static,
Source§impl<M> IntoDetail<M> for BooleanColumn<M>where
BooleanColumn<M>: Column<M> + 'static,
impl<M> IntoDetail<M> for BooleanColumn<M>where
BooleanColumn<M>: Column<M> + 'static,
fn into_detail(self) -> Detail<M>
Auto Trait Implementations§
impl<M> Freeze for BooleanColumn<M>
impl<M> RefUnwindSafe for BooleanColumn<M>where
M: RefUnwindSafe,
impl<M> Send for BooleanColumn<M>where
M: Send,
impl<M> Sync for BooleanColumn<M>where
M: Sync,
impl<M> Unpin for BooleanColumn<M>where
M: Unpin,
impl<M> UnsafeUnpin for BooleanColumn<M>
impl<M> UnwindSafe for BooleanColumn<M>where
M: UnwindSafe,
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