Skip to main content

Dataflow

Trait Dataflow 

Source
pub trait Dataflow: Metadata {
    // Required method
    fn get_wire_idx(&self, idx: usize) -> Value;

    // Provided method
    fn get_wire<W: WireKey>(&self, key: W) -> Option<Value> { ... }
}
Expand description

The interpreter kernel’s raw read of its input wires, by index or by name. Writes go through Kernel::set_input and Kernel::set_input_at, which refuse a value of another type. Interpreter-only.

Required Methods§

Source

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§

Source

fn get_wire<W: WireKey>(&self, key: W) -> Option<Value>

Read the current value of a wire identified by key (index or name). Returns None when the wire is not found.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§