[][src]Struct splinter::mesh::Envelope

pub struct Envelope { /* fields omitted */ }

Contains a payload and the identifier for the connection on which the payload was received

Implementations

impl ConnectionMatrixEnvelope[src]

pub fn new(id: String, payload: Vec<u8>) -> Self[src]

Creates a new ConnectionMatrixEnvelope

This is used by the implementation of a ConnectionMatrixReceiver to create the envelope returned by recv or recv_timeout.

pub fn id(&self) -> &str[src]

Returns the connection identifier of the connection on which the payload was received

pub fn payload(&self) -> &[u8][src]

Returns the bytes of the payload

pub fn take_payload(self) -> Vec<u8>[src]

Returns the bytes of the payload while consuming the ConnectionMatrixEnvelope

pub fn into_inner(self) -> Vec<u8>[src]

Returns the payload and consumes the ConnectionMatrixEnvelope

Trait Implementations

impl Debug for ConnectionMatrixEnvelope[src]

impl Default for ConnectionMatrixEnvelope[src]

impl From<ConnectionMatrixEnvelope> for Vec<u8>[src]

impl PartialEq<ConnectionMatrixEnvelope> for ConnectionMatrixEnvelope[src]

impl StructuralPartialEq for ConnectionMatrixEnvelope[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> From<T> for T[src]

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

impl<P, N> IntoBytes<P> for N where
    P: Message + FromNative<N>, 
[src]

impl<N, P> IntoNative<N> for P where
    N: FromProto<P>, 
[src]

impl<N, P> IntoProto<P> for N where
    P: FromNative<N>, 
[src]

impl<T> IntoSql for T

impl<T> Same<T> for T

type Output = T

Should always be Self

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<T> Typeable for T where
    T: Any

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