Enum sn_messaging::node::NodeMsg [−][src]
pub enum NodeMsg { NodeCmd { cmd: NodeCmd, id: MessageId, }, NodeCmdError { error: NodeCmdError, id: MessageId, correlation_id: MessageId, }, NodeEvent { event: NodeEvent, id: MessageId, correlation_id: MessageId, }, NodeQuery { query: NodeQuery, id: MessageId, }, NodeQueryResponse { response: NodeQueryResponse, id: MessageId, correlation_id: MessageId, }, NodeMsgError { error: Error, id: MessageId, correlation_id: MessageId, }, }
Expand description
Variants
Cmds only sent internally in the network.
An error of a NodeCmd.
Show fields
Fields of NodeCmdError
Events only sent internally in the network.
Show fields
Queries is a read-only operation.
The response to a query, containing the query result.
Show fields
Fields of NodeQueryResponse
response: NodeQueryResponse
QueryResponse.
id: MessageId
Message ID.
correlation_id: MessageId
ID of causing query.
The returned error, from any msg handling on recipient node.
Show fields
Implementations
Convenience function to deserialize a ‘NodeMsg’ from bytes received over the wire. It returns an error if the bytes don’t correspond to a node command message.
pub fn serialize(
&self,
dest: XorName,
dest_section_pk: BlsPublicKey,
src_section_pk: Option<BlsPublicKey>
) -> Result<Bytes>
[src]
pub fn serialize(
&self,
dest: XorName,
dest_section_pk: BlsPublicKey,
src_section_pk: Option<BlsPublicKey>
) -> Result<Bytes>
[src]serialize this NodeCmd message into bytes ready to be sent over the wire.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for NodeMsg
impl UnwindSafe for NodeMsg
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V