pub struct NodeNetwork {
pub node_network: HashMap<String, Vec<NodeNetworkItem>>,
}
Expand description
§NodeNetwork
The NodeNetwork type represents the network of nodes. It is just a HashMap that is keyed my a string that represents a grouping of nodes. This grouping is not required by will allow for having various groups of downstream nodes receive different messages from another group. While this grouping is optional, it does provide for increased flexibility.
The way that this would work is that a node’s implementation of the FBPNodeTrait::process_message would need to determine if there were a separate grouping of nodes for a specific need and only send specific messages to that group. A made up example might be that a separate logging group exists and the node would performs its ‘normal’ processing and then send that result on to the ‘normal’ outputs, while it could also send logging information to a logging group.
The value of the HashMap is a Vector of NodeNetworkItems that represent an FBP Node that will be constructed and placed into the same position as the NodeNetworkItem in the NodeNetwork.
Fields§
§node_network: HashMap<String, Vec<NodeNetworkItem>>
Implementations§
Source§impl NodeNetwork
impl NodeNetwork
pub fn new() -> Self
pub fn node_network(&self) -> &HashMap<String, Vec<NodeNetworkItem>>
pub fn find_node_by_name( &mut self, node_name: String, key: Option<String>, ) -> Option<&mut NodeNetworkItem>
pub fn add_node(&mut self, node_name: String, key: Option<String>)
pub fn add_exiting_node(&mut self, a_node: NodeNetworkItem, key: Option<String>)
Trait Implementations§
Source§impl Clone for NodeNetwork
impl Clone for NodeNetwork
Source§fn clone(&self) -> NodeNetwork
fn clone(&self) -> NodeNetwork
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more