pub struct DateColumn<M, T> { /* private fields */ }Expand description
A column of a date field, rendered as a calendar day.
tablo_core::DateColumn::new(tablo_core::lens!(Post.published_at)).sortable();The cell spells the day in the request’s locale, Oct 14, 2026 in English, a timestamp’s in
the request’s time_zone, and a None renders the table’s dash. The export
writes the stored spelling, 2026-10-14T09:30:00Z or 2026-10-14, as a
TextColumn does; a group header follows the field, not the column.
Implementations§
Source§impl<M, T> DateColumn<M, T>where
M: Model,
impl<M, T> DateColumn<M, T>where
M: Model,
Sourcepub fn new(lens: Lens<M, T>) -> Selfwhere
T: DateValue,
pub fn new(lens: Lens<M, T>) -> Selfwhere
T: DateValue,
Bind the column to the date field lens reads.
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, T> Clone for DateColumn<M, T>
impl<M, T> Clone for DateColumn<M, T>
Source§impl<M, T> Column<M> for DateColumn<M, T>
impl<M, T> Column<M> for DateColumn<M, T>
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 is_sortable(&self) -> bool
fn is_sortable(&self) -> bool
Whether the header links to a sort on this 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.
Source§fn is_searchable(&self) -> bool
fn is_searchable(&self) -> bool
Whether the column joins the table’s search.
Source§impl<M, T> Debug for DateColumn<M, T>
impl<M, T> Debug for DateColumn<M, T>
impl<M, T> IntoColumns<M> for DateColumn<M, T>where
Self: Column<M> + 'static,
Source§impl<M, T> IntoDetail<M> for DateColumn<M, T>where
Self: Column<M> + 'static,
impl<M, T> IntoDetail<M> for DateColumn<M, T>where
Self: Column<M> + 'static,
fn into_detail(self) -> Detail<M>
Auto Trait Implementations§
impl<M, T> Freeze for DateColumn<M, T>
impl<M, T> RefUnwindSafe for DateColumn<M, T>where
Lens<M, T>: RefUnwindSafe,
impl<M, T> Send for DateColumn<M, T>
impl<M, T> Sync for DateColumn<M, T>
impl<M, T> Unpin for DateColumn<M, T>
impl<M, T> UnsafeUnpin for DateColumn<M, T>where
Lens<M, T>: UnsafeUnpin,
impl<M, T> UnwindSafe for DateColumn<M, T>where
Lens<M, T>: 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