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 label(self, label: impl Into<Text>) -> Self
pub fn label(self, label: impl Into<Text>) -> Self
Replace the label the field’s name gives it.
Sourcepub fn width(self, width: ColumnWidth) -> Self
pub fn width(self, width: ColumnWidth) -> Self
Declare this column’s width.
Sourcepub fn toggleable(self) -> Self
pub fn toggleable(self) -> Self
Let each reader hide this column from their list; it starts shown.
Let each reader show this column in their list; it starts hidden.
Trait Implementations§
Source§impl<M> Clone for BooleanColumn<M>
impl<M> Clone for BooleanColumn<M>
Source§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>
impl<M> IntoColumns<M> for BooleanColumn<M>where
Self: Column<M> + 'static,
Source§impl<M> IntoDetail<M> for BooleanColumn<M>where
Self: Column<M> + 'static,
impl<M> IntoDetail<M> for BooleanColumn<M>where
Self: Column<M> + 'static,
fn into_detail(self) -> Detail<M>
Auto Trait Implementations§
impl<M> Forget for BooleanColumn<M>
impl<M> Freeze for BooleanColumn<M>
impl<M> Move for BooleanColumn<M>
impl<M> RefUnwindSafe for BooleanColumn<M>
impl<M> Send for BooleanColumn<M>
impl<M> Sync for BooleanColumn<M>
impl<M> Unpin for BooleanColumn<M>
impl<M> UnsafeUnpin for BooleanColumn<M>
impl<M> UnwindSafe for BooleanColumn<M>
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