Skip to main content

DataflowNode

Trait DataflowNode 

Source
pub trait DataflowNode<T>: Send + Sync {
    // Required methods
    fn push(&self, value: T);
    fn pull(&self) -> Option<T>;
}
Expand description

Trait for nodes in the dataflow graph.

Both push and pull are provided so a node can act as either a consumer (pull from upstream, push downstream) or a pure transformer.

Required Methods§

Source

fn push(&self, value: T)

Push a value into this node. The node may buffer or forward it.

Source

fn pull(&self) -> Option<T>

Pull the next available value from this node’s output queue.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Clone + Send + Sync + 'static> DataflowNode<T> for Sink<T>

Source§

impl<T: Clone + Send + Sync + 'static> DataflowNode<T> for Source<T>

Source§

impl<T: Send + Sync + 'static, U: Send + Sync + 'static> DataflowNode<T> for Map<T, U>

Source§

impl<T: Send + Sync + 'static> DataflowNode<T> for Buffer<T>

Source§

impl<T: Send + Sync + 'static> DataflowNode<T> for Filter<T>