pub struct InOutNode<TIn, TOut, TCollected, TNext>{ /* private fields */ }
Expand description
Struct representing a stage, with an input and an output, of a pipeline.
Implementations§
source§impl<TIn, TOut, TCollected, TNext> InOutNode<TIn, TOut, TCollected, TNext>
impl<TIn, TOut, TCollected, TNext> InOutNode<TIn, TOut, TCollected, TNext>
sourcepub fn new(
handler: Box<dyn InOut<TIn, TOut> + Send + Sync>,
next_node: TNext,
orchestrator: Arc<Orchestrator>
) -> InOutNode<TIn, TOut, TCollected, TNext>
pub fn new( handler: Box<dyn InOut<TIn, TOut> + Send + Sync>, next_node: TNext, orchestrator: Arc<Orchestrator> ) -> InOutNode<TIn, TOut, TCollected, TNext>
Create a new Node.
The handler
is the struct that implement the trait InOut
and defines
the behavior of the node we’re creating.
next_node
contains the stage that follows the node.
Trait Implementations§
source§impl<TIn, TOut, TCollected, TNext> Node<TIn, TCollected> for InOutNode<TIn, TOut, TCollected, TNext>
impl<TIn, TOut, TCollected, TNext> Node<TIn, TCollected> for InOutNode<TIn, TOut, TCollected, TNext>
source§fn send(&self, input: Message<TIn>, rec_id: usize) -> Result<(), SenderError>
fn send(&self, input: Message<TIn>, rec_id: usize) -> Result<(), SenderError>
Send a message to the node.
source§fn collect(self) -> Option<TCollected>
fn collect(self) -> Option<TCollected>
Collect the final result stored in the last stage of the pipeline where is located this node.
source§fn get_num_of_replicas(&self) -> usize
fn get_num_of_replicas(&self) -> usize
Fetch the number of replicas of this node.
Auto Trait Implementations§
impl<TIn, TOut, TCollected, TNext> !RefUnwindSafe for InOutNode<TIn, TOut, TCollected, TNext>
impl<TIn, TOut, TCollected, TNext> Send for InOutNode<TIn, TOut, TCollected, TNext>
impl<TIn, TOut, TCollected, TNext> Sync for InOutNode<TIn, TOut, TCollected, TNext>
impl<TIn, TOut, TCollected, TNext> Unpin for InOutNode<TIn, TOut, TCollected, TNext>
impl<TIn, TOut, TCollected, TNext> !UnwindSafe for InOutNode<TIn, TOut, TCollected, TNext>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more