pub struct FileColumn<M> { /* private fields */ }Expand description
A column of a String field holding an uploaded file’s path, rendered as a link to the file.
tablo_core::FileColumn::new(tablo_core::lens!(Doc.path));The cell links a rooted path or an absolute http(s) URL, the same rule a
Field::file control applies, and shows any other value as text.
Implementations§
Source§impl<M> FileColumn<M>where
M: Model,
impl<M> FileColumn<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 FileColumn<M>
impl<M> Clone for FileColumn<M>
Source§impl<M> Column<M> for FileColumn<M>
impl<M> Column<M> for FileColumn<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 search_expr(&self, _term: &str) -> Option<Expr<bool>>
fn search_expr(&self, _term: &str) -> Option<Expr<bool>>
The predicate a search for
term adds, or None when the column does not join the table’s
search. A column that joins it answers Some for every non-empty, trimmed term.Source§impl<M> Debug for FileColumn<M>
impl<M> Debug for FileColumn<M>
impl<M> IntoColumns<M> for FileColumn<M>where
Self: Column<M> + 'static,
Source§impl<M> IntoDetail<M> for FileColumn<M>where
Self: Column<M> + 'static,
impl<M> IntoDetail<M> for FileColumn<M>where
Self: Column<M> + 'static,
fn into_detail(self) -> Detail<M>
Auto Trait Implementations§
impl<M> Forget for FileColumn<M>
impl<M> Freeze for FileColumn<M>
impl<M> Move for FileColumn<M>
impl<M> RefUnwindSafe for FileColumn<M>
impl<M> Send for FileColumn<M>
impl<M> Sync for FileColumn<M>
impl<M> Unpin for FileColumn<M>
impl<M> UnsafeUnpin for FileColumn<M>
impl<M> UnwindSafe for FileColumn<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