pub struct SegmentOverride {
pub priority: Option<u8>,
pub width: Option<WidthBoundsConfig>,
pub style: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
[segments.<id>] override block. Each typed field, when Some,
replaces the segment’s built-in default. Any unrecognized keys land
in extra, which the segment builder forwards to
plugin scripts as ctx.config.<key>. style is stored as a raw
string; the segment builder parses it at build time
so parse errors emit warnings through the same callback that
handles unknown-ID and inverted-bounds diagnostics.
Eq isn’t derived because toml::Value holds f64 and so is
PartialEq only — extra propagates that constraint.
Fields§
§priority: Option<u8>§width: Option<WidthBoundsConfig>§style: Option<String>§extra: BTreeMap<String, Value>Plugin-config bag: every TOML key under [segments.<plugin-id>]
not matched by a typed field. Surfaced to the rhai script as
ctx.config.<key> per docs/specs/plugin-api.md §ctx shape.
Built-in segments ignore this; the unknown-key validator still
warns when a built-in’s table contains keys outside its schema.
Schema bypass: toml::Value has no JsonSchema impl, so
remap to serde_json::Value’s open-ended schema for the
additionalProperties fallthrough.
Trait Implementations§
Source§impl Clone for SegmentOverride
impl Clone for SegmentOverride
Source§fn clone(&self) -> SegmentOverride
fn clone(&self) -> SegmentOverride
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 SegmentOverride
impl Debug for SegmentOverride
Source§impl Default for SegmentOverride
impl Default for SegmentOverride
Source§fn default() -> SegmentOverride
fn default() -> SegmentOverride
Source§impl<'de> Deserialize<'de> for SegmentOverridewhere
SegmentOverride: Default,
impl<'de> Deserialize<'de> for SegmentOverridewhere
SegmentOverride: Default,
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 SegmentOverride
impl JsonSchema for SegmentOverride
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 moreSource§impl PartialEq for SegmentOverride
impl PartialEq for SegmentOverride
Source§fn eq(&self, other: &SegmentOverride) -> bool
fn eq(&self, other: &SegmentOverride) -> bool
self and other values to be equal, and is used by ==.