pub struct ListColumn {
pub field: String,
pub label: Text,
pub column_type: String,
pub sortable: bool,
pub invisible: bool,
pub width: Option<String>,
pub align: Option<Align>,
pub permission: Option<String>,
pub searchable: Option<bool>,
}Fields§
§field: String§label: TextThe column header, localized at render. Serde stays a plain string.
column_type: StringThe column-type registry key (text, date, boolean, status_pill, …).
sortable: boolWhether the header sorts. Off for a column whose order means nothing.
invisible: boolHidden until the operator picks it from the column chooser.
width: Option<String>A CSS width, 10% or 120px. None shares the remaining space.
align: Option<Align>§permission: Option<String>A permission the operator must hold to see the column at all: it is then not queried, sorted, searched, picked or exported for them.
searchable: Option<bool>Whether the list’s search box looks in this column. None follows the
column type: text columns are searched, the rest are not, because a
substring match on a boolean or a stored timestamp answers nonsense.
Implementations§
Source§impl ListColumn
impl ListColumn
pub fn new(field: &str, label: impl Into<Text>) -> Self
Sourcepub fn searchable(self, searchable: bool) -> Self
pub fn searchable(self, searchable: bool) -> Self
Overrides whether the search box looks in this column.
pub fn sortable(self, sortable: bool) -> Self
pub fn width(self, width: impl Into<String>) -> Self
pub fn align(self, align: Align) -> Self
Trait Implementations§
Source§impl Clone for ListColumn
impl Clone for ListColumn
Source§impl Debug for ListColumn
impl Debug for ListColumn
Auto Trait Implementations§
impl Freeze for ListColumn
impl RefUnwindSafe for ListColumn
impl Send for ListColumn
impl Sync for ListColumn
impl Unpin for ListColumn
impl UnsafeUnpin for ListColumn
impl UnwindSafe for ListColumn
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,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more