pub trait Dataflow: Metadata {
// Required methods
fn set_wire_idx(
&mut self,
idx: usize,
value: Value,
) -> Result<(), WriteError>;
fn get_wire_idx(&self, idx: usize) -> Value;
// Provided methods
fn set_wire<W: WireKey>(
&mut self,
key: W,
value: Value,
) -> Result<(), WriteError> { ... }
fn get_wire<W: WireKey>(&self, key: W) -> Option<Value> { ... }
}Expand description
The interpreter kernel’s healing write and raw read: write inputs, read wires.
Four core methods. The indexed pair is the fast path; the named
pair resolves against the context’s metadata then delegates to the
indexed pair. A write runs the boundary adapter catalog before a
typed rejection, where Kernel::set_input refuses a value of
another type outright. Interpreter-only.
Required Methods§
Sourcefn set_wire_idx(&mut self, idx: usize, value: Value) -> Result<(), WriteError>
fn set_wire_idx(&mut self, idx: usize, value: Value) -> Result<(), WriteError>
Write a value to wire idx with typed enforcement.
Per composition_substrate.md axiom S4, the typed-write
boundary enforces T1 + T2: the value’s port type must
match the slot’s declared port type, with auto-adapter
healing where the implementation supports it. Mismatches
the boundary cannot heal return WriteError::TypeMismatch.
An out-of-range index returns
WriteError::UnknownWire.
Sourcefn get_wire_idx(&self, idx: usize) -> Value
fn get_wire_idx(&self, idx: usize) -> Value
Read the current value of wire idx. Out-of-range
behaviour returns the slot’s default Value::None (the
read path is non-fallible; type information is structural
and reads cannot fail typewise).
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".