Struct fbp::fbp_iidmessage::ProcessMessage[][src]

pub struct ProcessMessage {
    pub message_node: Option<Uuid>,
    // some fields omitted
}
Expand description

Provides the structure of payload of an IIDMessage when the IIDMessage has a type of MessageType::Process

Fields

message_node: Option<Uuid>

Implementations

Creates a new ProcessMessage with a specific type and a flag to signal if the message shold be propagated

Example

Basic usage:

use fbp::fbp_iidmessage::*;

let p_msg = ProcessMessage::new(ProcessMessageType::Stop, true);

Retrieves a Process message’s type

Example

Basic usage:

use fbp::fbp_iidmessage::*;

pub fn deal_with_process_msg(p_msg: ProcessMessage) {
	if p_msg.msg() == ProcessMessageType::Stop {
		//  Time to stop!
	}
}

Retrieves a Process message propagate flag

Example

Basic usage:

use fbp::fbp_iidmessage::*;

pub fn should_propagate_process_msg(p_msg: ProcessMessage) -> bool {
	p_msg.propagate()
}

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This will deserialize a JSON string that is a serialized Rust struct back into the original struct Read more

This will take a struct and serialize that struct into a JSON string that will then become the payload of an IIDMesssage 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.