pub trait ImportOperator<I, O>: Operator {
// Required methods
async fn import(&mut self, val: &I);
async fn import_owned(&mut self, val: I);
async fn eval(&mut self) -> O;
// Provided method
fn input_preference(&self) -> OwnershipPreference { ... }
}Expand description
An import operator makes a stream from the parent circuit available inside a subcircuit.
Import operators are the only kind of operator that span two clock domains: an import operator reads a single value from the parent stream per parent clock tick and produces a stream of outputs in the nested circuit, one for each nested clock tick.
See Delta0 for a concrete example
of an import operator.
Required Methods§
Sourceasync fn import(&mut self, val: &I)
async fn import(&mut self, val: &I)
Consumes a value from the parent stream by reference.
Either import or Self::import_owned is invoked once per
nested clock epoch, right after clock_start(0).
Sourceasync fn import_owned(&mut self, val: I)
async fn import_owned(&mut self, val: I)
Consumes a value from the parent stream by value.
Provided Methods§
Sourcefn input_preference(&self) -> OwnershipPreference
fn input_preference(&self) -> OwnershipPreference
Ownership preference on the operator’s input stream
(see OwnershipPreference).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".