pub enum TemplateError {
Show 17 variants
UnknownParameter {
name: String,
},
MissingParameter {
name: String,
},
DuplicateParameter {
name: String,
},
AliasedArgument {
first: String,
second: String,
},
ForeignHandle {
slot: CellSlot,
},
InvalidActual {
name: String,
actual: CellId,
},
TypeMismatch {
name: String,
expected: TypeId,
found: TypeId,
},
OutArgument {
name: String,
actual: CellId,
},
EmptyRelationship,
ConditionalComponent,
InvalidDefinition {
detail: &'static str,
slot: Option<CellSlot>,
},
Capacity,
Factory {
source: Error,
slot: CellSlot,
},
ConditionalFactory {
source: Error,
},
Construction {
template: TemplateId,
site: ConstructionSite,
inclusions: Vec<RelationshipSlot>,
source: Box<TemplateError>,
},
ConditionalConstruction {
template: TemplateId,
conditional: usize,
inclusions: Vec<RelationshipSlot>,
source: Box<TemplateError>,
},
Runtime(Error),
}Expand description
Identifies a malformed recipe, binding, factory, or native graph construction.
Binding and declared-structure errors precede destination mutation. Factory-result
validation, allocation and native construction failures may leave partial structure;
the sheet remains safe to discard. See super::SheetTemplate::instantiate.
§Examples
See ConstructionSite’s failed-initializer example.
Variants§
UnknownParameter
A binding names no formal parameter.
MissingParameter
A formal parameter has no binding.
DuplicateParameter
A formal name is declared or bound more than once.
AliasedArgument
Two formals bind the same actual cell.
Fields
ForeignHandle
A local handle belongs to another recipe.
InvalidActual
An actual handle is absent from the destination.
TypeMismatch
A binding’s concrete type differs from its formal declaration.
Fields
OutArgument
An actual is a caller-owned out cell, unsupported even as an input.
Fields
EmptyRelationship
A relationship has no methods.
ConditionalComponent
A component containing private structure is used in a relationship-only site.
InvalidDefinition
A declaration or factory result violates the recipe’s graph contract.
Fields
Capacity
The expanded graph exceeds representable or reservable capacity.
Factory
A repeatable initializer or method factory failed.
Fields
ConditionalFactory
A conditional’s repeatable match-expression or key factory failed.
Construction
Retains a construction boundary and only its actual root-to-child inclusion chain.
The boxed original failure preserves concrete error downcasting.
See super::SheetTemplate::instantiate.
Fields
template: TemplateIdIdentifies the failed definition.
site: ConstructionSiteIdentifies the declaration or registration that failed.
inclusions: Vec<RelationshipSlot>Retains active inclusion sites, ordered root to child.
source: Box<TemplateError>Retains the original failure without requiring Send or Sync.
ConditionalConstruction
Retains a failed conditional’s definition, local ordinal and active invocation sites.
Context owns identities, not recipes or live state. The original error and
its typed cause remain available through std::error::Error::source.
See super::SheetTemplate::instantiate.
Fields
template: TemplateIdIdentifies the definition containing the failed conditional.
inclusions: Vec<RelationshipSlot>Retains only active inclusion sites, ordered from the root to the failed definition.
source: Box<TemplateError>Retains the original concrete construction failure and its cause.
Runtime(Error)
An existing native graph mutator rejected construction.
Trait Implementations§
Source§impl Debug for TemplateError
impl Debug for TemplateError
Source§impl Display for TemplateError
impl Display for TemplateError
Source§impl Error for TemplateError
impl Error for TemplateError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the underlying factory or native construction failure.
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()