pub struct Exemplar {
pub title: String,
pub metadata: IndexMap<String, String>,
pub sections: IndexMap<String, String>,
pub relations: Vec<ExemplarRelation>,
}Expand description
One canonical exemplar entity for a type — a complete entity in the mem markdown shape: title, metadata overrides, section bodies, and relationship entries with placeholder targets. Engine-validated at schema install/seal through the real create path, so it can never teach a shape the validator would refuse.
Fields§
§title: StringThe exemplar entity’s title (drives the id slug exactly as a real create would).
metadata: IndexMap<String, String>Metadata overrides, keyed by declared field key — validated
like a real create’s metadata (enums included). Engine-stamped
fields (created_date, …) are omitted; the engine fills them.
sections: IndexMap<String, String>Section bodies keyed by section key. Required sections must all be present — the validator enforces it like any create.
relations: Vec<ExemplarRelation>Relationship entries with PLACEHOLDER targets: each to is a
bare slug (no mem-- prefix — an exemplar lives outside any
mem); validation checks rel-type legality and shape, never
target existence.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Exemplar
impl<'de> Deserialize<'de> for Exemplar
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 Exemplar
impl JsonSchema for Exemplar
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