pub trait Construction: Sized {
type Error;
// Required methods
fn root(matter: PolydatMatter<'_>) -> Result<Self, Self::Error>;
fn subscope(&self, matter: PolydatMatter<'_>) -> Result<Self, Self::Error>;
}Expand description
Construction interface — the two sanctioned construction paths. Per the kernel-construction invariant:
- Root — built from Polydat matter, no parent.
- Subscope — built from Polydat matter against an existing context.
Both paths take the same typed Polydat matter
(super::subcontext::PolydatMatter). The only
difference is whether a parent context supervises
construction. Nothing else is allowed.
Required Associated Types§
Required Methods§
Sourcefn root(matter: PolydatMatter<'_>) -> Result<Self, Self::Error>
fn root(matter: PolydatMatter<'_>) -> Result<Self, Self::Error>
Path 1: build a root context from Polydat matter. No parent. Subscope-only fields on the matter (result-binding rewrites, inherited-output cascade, finalize-time contract checks) are not applicable here and are ignored.
Sourcefn subscope(&self, matter: PolydatMatter<'_>) -> Result<Self, Self::Error>
fn subscope(&self, matter: PolydatMatter<'_>) -> Result<Self, Self::Error>
Path 2: build a subscope context against self from
Polydat matter. The parent supervises: cell cascade, Rule 2
rewrites, scope-coordinate threading, init-binding
contract checks all flow from self into the child.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".