Skip to main content

Construction

Trait Construction 

Source
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:

  1. Root — built from Polydat matter, no parent.
  2. 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§

Source

type Error

Construction error type.

Required Methods§

Source

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.

Source

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".

Implementors§