pub enum ExplanationSupport {
OwnedEntry {
block: Block,
},
DeclarationGroup {
block_path: String,
group: DeclarationGroup,
members: Vec<OutlineTrail>,
block: Block,
},
ContainedDeclarationGroup {
block_path: String,
group: DeclarationGroup,
members: Vec<OutlineTrail>,
support: usize,
path: Vec<ExplanationBlockStep>,
},
}Expand description
Original content supporting directly matched declarations. IDs are indices in the containing document response’s pool, never persistent identities.
Variants§
OwnedEntry
A physical owner’s original body reused by contained contexts.
DeclarationGroup
Recovered adjacency supplies reading context, not proof that each sentence applies to every member or that members are interchangeable.
Fields
group: DeclarationGroupHalf-open range in the original list, before response slicing.
members: Vec<OutlineTrail>Original members in source order; the last supplies the description.
ContainedDeclarationGroup
A nested declaration group already present in another returned source fragment. The descriptor preserves its own members and provider without copying their body again. References point directly to an owned fragment.
Fields
group: DeclarationGroupOriginal member interval in the nested list.
members: Vec<OutlineTrail>Exact nested members, in source order.
path: Vec<ExplanationBlockStep>Typed path from that fragment’s copied block to the nested list.
Implementations§
Source§impl ExplanationSupport
impl ExplanationSupport
Sourcepub fn items(&self) -> Option<&[DefinitionItem]>
pub fn items(&self) -> Option<&[DefinitionItem]>
Validate the local/original ranges and exact member identities before accepting any reference. Context cannot silently point at another owner.
Sourcepub fn items_in<'a>(&'a self, pool: &'a [Self]) -> Option<&'a [DefinitionItem]>
pub fn items_in<'a>(&'a self, pool: &'a [Self]) -> Option<&'a [DefinitionItem]>
Resolve this group’s original member interval, including a contained fragment. References never follow chains or cross document pools.
Sourcepub fn members(&self) -> &[OutlineTrail]
pub fn members(&self) -> &[OutlineTrail]
Member trails belonging to this group, not its enclosing context.
Sourcepub fn materialized<'a>(&'a self, pool: &'a [Self]) -> Option<&'a Block>
pub fn materialized<'a>(&'a self, pool: &'a [Self]) -> Option<&'a Block>
Materialized outer source block, if the complete descriptor is valid. Frontends render this block once and retain each group’s own provenance.
Trait Implementations§
Source§impl Clone for ExplanationSupport
impl Clone for ExplanationSupport
Source§fn clone(&self) -> ExplanationSupport
fn clone(&self) -> ExplanationSupport
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 ExplanationSupport
impl Debug for ExplanationSupport
Source§impl<'de> Deserialize<'de> for ExplanationSupport
impl<'de> Deserialize<'de> for ExplanationSupport
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>,
impl Eq for ExplanationSupport
Source§impl JsonSchema for ExplanationSupport
impl JsonSchema for ExplanationSupport
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