pub struct DisplayField {
pub field: String,
pub label: String,
pub kind: Option<String>,
pub columns: Option<Vec<DisplayField>>,
}Fields§
§field: StringTop-level key in the stdout JSON.
label: StringHuman-readable column header.
kind: Option<String>Optional render hint — "number", "bytes", "timestamp",
or "table" (#39). Defaults to plain text rendering on the
SPA side. "table" expects the field’s value to be a JSON
array of objects and renders a nested sub-table on the
per-PC detail page using columns as the schema; the fleet
summary view falls back to showing the row count for
"table" cells so the wide list stays compact.
columns: Option<Vec<DisplayField>>v0.30 / #39: when kind == "table", the SPA renders the
field’s value (an array of objects like
disks: [{ device_id, size_bytes, ... }]) as a nested
sub-table using these columns. Each column is itself a
DisplayField, so the nested cells reuse the same render
hints (bytes, number, timestamp) — no parallel format
pipeline. Ignored for any other kind.
Trait Implementations§
Source§impl Clone for DisplayField
impl Clone for DisplayField
Source§fn clone(&self) -> DisplayField
fn clone(&self) -> DisplayField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DisplayField
impl Debug for DisplayField
Source§impl<'de> Deserialize<'de> for DisplayField
impl<'de> Deserialize<'de> for DisplayField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for DisplayField
impl JsonSchema for DisplayField
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more