pub enum ListColumn {
Field {
column: &'static str,
label: &'static str,
},
JsonField {
key: &'static str,
label: &'static str,
kind: ListColumnKind,
},
Method {
name: &'static str,
label: &'static str,
},
Computed {
name: &'static str,
label: &'static str,
},
}Expand description
One column shown in the snippet list view for a given type.
A column can be a
scalar field on cms_snippet, a data.<key> JSON lookup, a
method-field rendered by the handler, or a computed value
derived at render time.
Variants§
Field
Scalar column on cms_snippet (slug, title,
updated_at, …). Renders with type-aware formatting.
JsonField
data.<key> JSON lookup. Renders with the requested kind so
e.g. a boolean in data shows as a checkbox.
Method
Method field — the admin calls
LibraryTypeHandler::render_cell with the column name plus
the snippet row; the handler returns pre-escaped display
HTML.
Computed
Runtime-derived column. Same render pathway as Method
(cells route through render_cell), but declared separately
so authors can express intent — Method connotes “computed
by a method on the typed extension”, Computed connotes
“derived from any context the handler wants”.
Implementations§
Trait Implementations§
Source§impl Clone for ListColumn
impl Clone 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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