Skip to main content

Module stub

Module stub 

Source
Expand description

SRD-84 Part 3 — caller-native, typed polydat expression stubs.

Lets Rust code build a polydat binding from an expression and emit it as a Statement for a grammar-safe crate::kernel::subcontext::module::BodyFragment::Statements (SRD-84 Part 2) — without concatenating source strings. The return type is bound at the call site via the SRD-80b Wire trait, so the Rust generic and the polydat target type are one and the same.

Synthesizers (metrics, poll, stop conditions) build stubs; only user-authored predicate text is parsed, once, at the boundary (ExprStub::parse).

Structs§

ExprStub
A caller-native expression stub: a named binding over a polydat expression, optionally type-coerced (via the SRD-84 Part 1b as cast) and volatile.
GraphMatter
SRD-84 shape 1 — grammar-safe graph matter: a bundle of statements the polydat kernel compiler turns into a kernel. Built programmatically (typed externs + ExprStub bindings), never from a source string. Feeds PolydatMatter / BodyFragment::Statements.
ScopedExpr
SRD-84 shape 2 — a polydat expression bound to a parent kernel’s lexical scope. Compiled into a sub-context whose named output is the expression, evaluable many times against injected inputs. The return is whatever Wire type the bound stub was qualified with (ExprStub::returning::<T>), or its natural truthiness (is_true). A general-purpose, scope-bound, callable expression holder.