pub enum ConstructionSite {
Cell(CellSlot),
Policy {
cell: CellSlot,
index: usize,
},
Method {
relationship: RelationshipSlot,
index: usize,
},
Relationship(RelationshipSlot),
}Expand description
Identifies an authored construction boundary before any live relationship exists.
Method indices precede source specialization; policy indices count registrations on the same local cell. Handles retain definition identity without retaining recipes.
§Examples
use adam_rs::{ConstructionSite, Sheet, TemplateBuilder, TemplateError};
let mut builder = TemplateBuilder::new();
let slot = builder.cell::<i32, _>("value",
|| Err(std::io::Error::other("initialization failed").into()))?;
let template = builder.finish()?;
let error = template.instantiate(&mut Sheet::new(), &[]).unwrap_err();
assert!(matches!(error, TemplateError::Construction {
site: ConstructionSite::Cell(ref failed), ..
} if failed == &slot));Variants§
Cell(CellSlot)
Constructs one private cell.
Policy
Attaches one cell’s filter or requirement, in registration order.
Fields
Method
Constructs one authored method before specialization.
Fields
§
relationship: RelationshipSlotIdentifies the local relationship.
Relationship(RelationshipSlot)
Registers the combined relationship after its factories succeed.
Trait Implementations§
Auto Trait Implementations§
impl !Send for ConstructionSite
impl !Sync for ConstructionSite
impl Freeze for ConstructionSite
impl RefUnwindSafe for ConstructionSite
impl Unpin for ConstructionSite
impl UnsafeUnpin for ConstructionSite
impl UnwindSafe for ConstructionSite
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more