pub trait ColumnType:
Send
+ Sync
+ 'static {
// Required methods
fn view_key(&self) -> &'static str;
fn view_model(&self, cx: &CellCx<'_>) -> CellVm;
fn render_default(&self, vm: &CellVm) -> Markup;
// Provided methods
fn option_keys(&self) -> Option<Vec<&'static str>> { ... }
fn assets(&self) -> Vec<&'static str> { ... }
}Expand description
A column type: how a list cell renders. The list counterpart of a field type,
sharing Markup and the override resolver (Surface::Column).
Required Methods§
fn view_key(&self) -> &'static str
fn view_model(&self, cx: &CellCx<'_>) -> CellVm
fn render_default(&self, vm: &CellVm) -> Markup
Provided Methods§
Sourcefn option_keys(&self) -> Option<Vec<&'static str>>
fn option_keys(&self) -> Option<Vec<&'static str>>
The keys this type reads from a column’s entry, beyond the ones every
column has. A key outside the list is refused when the file is read.
None accepts any key unchecked; declare yours.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".