Struct fbp::fbp_node_context::FBPNodeSender[][src]

pub struct FBPNodeSender { /* fields omitted */ }
Expand description

FBPNodeSender

The FBPNodeSender Wraps a SenderWrapper in a ThreadSafeType so that multiple threads will be able to access the underlying std::sync::mpsc::Sender

Implementations

Creates a new FBPNodeSender

Example

Basic usage:

use std::sync::mpsc::{channel};

use fbp::fbp_node_context::; use fbp::fbp_iidmessage::;

let (sender, _) = channel::(); let node_sender = FBPNodeSender::new(SenderWrapper(sender));

Send an IIDMessage to a Node

Basic usage: use std::sync::mpsc::{channel};

use fbp::fbp_node_context::; use fbp::fbp_iidmessage::;

let (sender, _) = channel::(); let node_sender = FBPNodeSender::new(SenderWrapper(sender)); let msg = IIDMessage::new(MessageType::Data, Some(“This is the message payload”.to_string())); node_sender.send(msg);

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.