pub trait AnyNode:
Any
+ Send
+ Sync
+ 'static {
Show 13 methods
// Required methods
fn stage_shape(&self) -> &'static StageShape;
fn into_any(self: Box<Self>) -> Box<dyn Any>;
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
fn eval(&mut self) -> Result<Box<dyn DynFields>, InjectionError>;
fn reeval_rule(&self) -> ReevaluationRule;
fn flow_data(
&mut self,
child: &mut Box<dyn AnyNode>,
output: Option<&'static str>,
input: Option<&'static str>,
) -> Result<(), InjectionError>;
fn inputs_mut(&mut self) -> &mut dyn DynFields;
fn outputs_mut(&mut self) -> &mut dyn DynFields;
fn set_input_changed(&mut self, val: bool);
fn input_changed(&self) -> bool;
fn cache_mut(&mut self) -> &mut dyn Any;
fn clear_state(&mut self);
}Expand description
This is used to type-erase a node. It’s public because the macro needs to use this, but there should be no reason anyone should manually implement this.
Required Methods§
Sourcefn stage_shape(&self) -> &'static StageShape
fn stage_shape(&self) -> &'static StageShape
Gets the shape of the stage
Sourcefn into_any(self: Box<Self>) -> Box<dyn Any>
fn into_any(self: Box<Self>) -> Box<dyn Any>
Upcast to dyn Any to get its more-specific downcast capabilities
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
USed to get mutable access to state
Sourcefn eval(&mut self) -> Result<Box<dyn DynFields>, InjectionError>
fn eval(&mut self) -> Result<Box<dyn DynFields>, InjectionError>
Evaluates the node. Returns a map of prior outputs
fn reeval_rule(&self) -> ReevaluationRule
Sourcefn flow_data(
&mut self,
child: &mut Box<dyn AnyNode>,
output: Option<&'static str>,
input: Option<&'static str>,
) -> Result<(), InjectionError>
fn flow_data( &mut self, child: &mut Box<dyn AnyNode>, output: Option<&'static str>, input: Option<&'static str>, ) -> Result<(), InjectionError>
This a a core part of the plumbing of this crate - take the outputs of a parent node and use them to set the inputs of a child node.
Sourcefn inputs_mut(&mut self) -> &mut dyn DynFields
fn inputs_mut(&mut self) -> &mut dyn DynFields
Used to support [Self::flow_data]
Sourcefn outputs_mut(&mut self) -> &mut dyn DynFields
fn outputs_mut(&mut self) -> &mut dyn DynFields
Used to support [Self::flow_data]
Sourcefn set_input_changed(&mut self, val: bool)
fn set_input_changed(&mut self, val: bool)
Used to indicate that an input has been modified from a previous run.
Sourcefn input_changed(&self) -> bool
fn input_changed(&self) -> bool
See [Self::set_input_changed]