Struct sn_messaging::node::NodeMessage[][src]

pub struct NodeMessage(pub Vec<u8>);

Node message sent over the network.

Implementations

impl NodeMessage[src]

pub fn new(bytes: Bytes) -> Self[src]

Creates a new instance which wraps the provided node message bytes.

pub fn from(bytes: Bytes) -> Result<Self>[src]

Convinience function to deserialize a 'NodeMessage' from bytes received over the wire. It returns an error if the bytes don't correspond to a node message.

pub fn serialize(&self) -> Result<Bytes>[src]

serialize this NodeMessage into bytes ready to be sent over the wire.

Trait Implementations

impl Clone for NodeMessage[src]

impl Debug for NodeMessage[src]

impl<'de> Deserialize<'de> for NodeMessage[src]

impl Eq for NodeMessage[src]

impl PartialEq<NodeMessage> for NodeMessage[src]

impl Serialize for NodeMessage[src]

impl StructuralEq for NodeMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,