NodeResults

Trait NodeResults 

Source
pub trait NodeResults {
    // Required methods
    fn creates() -> Vec<TypeKey>;
    fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>;
}
Expand description

Trait for describing types that are the result of running a node.

When a node runs it may result in the creation of graph edges (ie resources). Graph edges are the resources that other nodes (ie functions) consume.

The NodeResults trait allows the library user to emit tuples of resources that will then be stored in the graph for downstream nodes to use as input.

Required Methods§

Source

fn creates() -> Vec<TypeKey>

All keys of types/resources created.

Source

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Attempt to pack the implementor’s constituent resources into the given TypeMap.

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.

Implementations on Foreign Types§

Source§

impl NodeResults for ()

Source§

impl<A> NodeResults for (A,)
where A: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B> NodeResults for (A, B)
where A: Any + Send + Sync, B: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C> NodeResults for (A, B, C)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D> NodeResults for (A, B, C, D)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D, E> NodeResults for (A, B, C, D, E)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync, E: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D, E, F> NodeResults for (A, B, C, D, E, F)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync, E: Any + Send + Sync, F: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D, E, F, G> NodeResults for (A, B, C, D, E, F, G)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync, E: Any + Send + Sync, F: Any + Send + Sync, G: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D, E, F, G, H> NodeResults for (A, B, C, D, E, F, G, H)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync, E: Any + Send + Sync, F: Any + Send + Sync, G: Any + Send + Sync, H: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D, E, F, G, H, I> NodeResults for (A, B, C, D, E, F, G, H, I)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync, E: Any + Send + Sync, F: Any + Send + Sync, G: Any + Send + Sync, H: Any + Send + Sync, I: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D, E, F, G, H, I, J> NodeResults for (A, B, C, D, E, F, G, H, I, J)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync, E: Any + Send + Sync, F: Any + Send + Sync, G: Any + Send + Sync, H: Any + Send + Sync, I: Any + Send + Sync, J: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> NodeResults for (A, B, C, D, E, F, G, H, I, J, K)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync, E: Any + Send + Sync, F: Any + Send + Sync, G: Any + Send + Sync, H: Any + Send + Sync, I: Any + Send + Sync, J: Any + Send + Sync, K: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> NodeResults for (A, B, C, D, E, F, G, H, I, J, K, L)
where A: Any + Send + Sync, B: Any + Send + Sync, C: Any + Send + Sync, D: Any + Send + Sync, E: Any + Send + Sync, F: Any + Send + Sync, G: Any + Send + Sync, H: Any + Send + Sync, I: Any + Send + Sync, J: Any + Send + Sync, K: Any + Send + Sync, L: Any + Send + Sync,

Source§

fn creates() -> Vec<TypeKey>

Source§

fn save(self, resources: &mut TypeMap) -> Result<(), GraphError>

Implementors§