Module fbp::fbp_node_context [−][src]
Expand description
Required data needed for all FBP Nodes
A Flow Based Programming node, provides for a unique set of processing to be done on incoming messages (data) that is run in an asynchronous thread. This thread has an input queue and a vector or output queues. The input queue holds the work items that a node will process in a FIFO order. The vector of output queues allows for multiple other nodes to receive the output from a node.
The FBPNodeContext struct provides all of the necessary items for a FBP node to operate. A specific instance of a FBP node must have a Box<FBPNodeContext> as one of its fields. This ensures that the specific instance can work as an FBP node.
Example
use crate::fbp::fbp_node_context::*;
use fbp::fbp_threadsafe_wrapper::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize)]
pub struct ExampleFBPNode {
data: Box<FBPNodeContext>,
}
Structs
FBP Node Context
FBPNodeReceiver
FBPNodeSender
ReceiverWrapper
SenderWrapper
Traits
Serializer trait for FBP Nodes