pub trait Stage: Clone {
type State;
type BaseFn;
// Required methods
fn inputs(&self) -> &HashMap<DataLabel, (TypeId, RefType)>;
fn outputs(&self) -> &HashMap<DataLabel, TypeId>;
fn evaluate(
&self,
state: &mut Option<Self::State>,
inputs: &mut HashMap<DataLabel, (Arc<dyn Any + Send + Sync>, ReevaluationRule)>,
) -> Result<NodeOutput>;
fn inject_input(
&self,
node: &mut Node<Self>,
parent: &mut Box<dyn AnyNode>,
output: DataLabel,
input: DataLabel,
) -> Result<(), Error>;
fn get_fn() -> Self::BaseFn;
// Provided methods
fn eval_strategy(&self) -> EvalStrategy { ... }
fn reeval_rule(&self) -> ReevaluationRule { ... }
}Expand description
Defines all the information about how a stage is handled.
Required Associated Types§
Required Methods§
Sourcefn evaluate(
&self,
state: &mut Option<Self::State>,
inputs: &mut HashMap<DataLabel, (Arc<dyn Any + Send + Sync>, ReevaluationRule)>,
) -> Result<NodeOutput>
fn evaluate( &self, state: &mut Option<Self::State>, inputs: &mut HashMap<DataLabel, (Arc<dyn Any + Send + Sync>, ReevaluationRule)>, ) -> Result<NodeOutput>
Evaluate the stage with the given input and state
Provided Methods§
fn eval_strategy(&self) -> EvalStrategy
fn reeval_rule(&self) -> ReevaluationRule
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.