pub struct ExemplarRelation {
pub target: Option<String>,
pub rel_type: Option<String>,
pub legacy_to: Option<String>,
pub legacy_type: Option<String>,
pub description: Option<String>,
}Expand description
One relationship entry on an Exemplar.
Authored in the mutation vocabulary (target: / rel_type:) so the
exemplar an agent reads is byte-for-byte the shape memstead_create
accepts. The retired authoring spelling (to: / type:) is
captured into the legacy_* sentinels for the loader’s legality
gate: authoring contexts refuse it with a rename pointer, sealed
content (built-ins, installed refs) is translated so shipped
versions keep loading — install-time strict, sealed-tolerant.
Fields§
§target: Option<String>Placeholder target: a bare slug, scoped to the exemplar’s own
(virtual) mem at validation time. Option only for the sealed
translate path — the loader guarantees Some on every loaded
schema.
rel_type: Option<String>Relationship type (UPPER_SNAKE_CASE; validated against the
schema’s declared vocabulary). Option only for the sealed
translate path — the loader guarantees Some on every loaded
schema.
legacy_to: Option<String>Retired spelling of target: — loader-gate sentinel, never
populated on a loaded schema.
legacy_type: Option<String>Retired spelling of rel_type: — loader-gate sentinel, never
populated on a loaded schema.
description: Option<String>Optional per-edge description — validated against the
rel-type’s per_edge_description posture.
Implementations§
Source§impl ExemplarRelation
impl ExemplarRelation
Sourcepub fn target_slug(&self) -> &str
pub fn target_slug(&self) -> &str
The resolved placeholder target. Loader-guaranteed present on any loaded schema; empty string only on a hand-built value that bypassed the loader.
Sourcepub fn rel_type_name(&self) -> &str
pub fn rel_type_name(&self) -> &str
The resolved rel-type name. Loader-guaranteed present on any loaded schema.
Trait Implementations§
Source§impl Clone for ExemplarRelation
impl Clone for ExemplarRelation
Source§fn clone(&self) -> ExemplarRelation
fn clone(&self) -> ExemplarRelation
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 ExemplarRelation
impl Debug for ExemplarRelation
Source§impl<'de> Deserialize<'de> for ExemplarRelation
impl<'de> Deserialize<'de> for ExemplarRelation
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 ExemplarRelation
impl JsonSchema for ExemplarRelation
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