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
impl NodeMsg
[src]
impl NodeMsg
[src]pub fn from(bytes: Bytes) -> Result<Self>
[src]
pub fn from(bytes: Bytes) -> Result<Self>
[src]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
impl<'de> Deserialize<'de> for NodeMsg
[src]
impl<'de> Deserialize<'de> for NodeMsg
[src]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
impl Eq for NodeMsg
[src]
impl StructuralEq for NodeMsg
[src]
impl StructuralPartialEq for NodeMsg
[src]
Auto Trait Implementations
impl RefUnwindSafe for NodeMsg
impl Send for NodeMsg
impl Sync for NodeMsg
impl Unpin for NodeMsg
impl UnwindSafe for NodeMsg
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,