IsGraphNode

Trait IsGraphNode 

Source
pub trait IsGraphNode<Input, Output> {
    // Required method
    fn into_node(self) -> Node<Function, TypeKey>;
}
Expand description

Defines graph nodes.

A node in the graph is a boxed Rust closure that may do any or all the following:

  • Create resources by returning a result that implements NodeResults.
  • Consume one or more resources by having a field in the input parameter wrapped in Move. The resource will not be available in the graph after the node is run.
  • Read one or more resources by having a field in the input parameter wrapped in View.
  • Write one or more resources by having a field in the input parameter wrapped in ViewMut.

By default IsGraphNode is implemented for functions that take one parameter implementing Edges and returning a Result where the “ok” type implements NodeResults.

Required Methods§

Source

fn into_node(self) -> Node<Function, TypeKey>

Convert the implementor into a Node.

Implementors§

Source§

impl<Input: Edges + Any + Send + Sync, Output: NodeResults + Any + Send + Sync, F: FnMut(Input) -> Result<Output, E> + Send + Sync + 'static, E: Into<GraphError>> IsGraphNode<Input, Output> for F