Struct ratman::Message[][src]

pub struct Message {
    pub id: MsgId,
    pub sender: Identity,
    pub recipient: Recipient,
    pub payload: Vec<u8>,
    pub timesig: TimePair,
    pub sign: Vec<u8>,
}

An atomic message with a variable sized payload

A message is only ever addressed to a single node, or everyone on the network. The signature is required to be present, if a payload is. The payload can be empty, which can be used to create a ping, or using the 16 byte MsgId as payload. In these cases, the sigature can also be empty.

Fields

id: MsgId

A random message ID

sender: Identity

Sender of a message

recipient: Recipient

Final recipient of a message

payload: Vec<u8>

The timestamp at which this message was received Some raw message payload

timesig: TimePair

Time signature information

sign: Vec<u8>

Signature data for userspace layers

Trait Implementations

impl Clone for Message[src]

impl Debug for Message[src]

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

impl Eq for Message[src]

impl PartialEq<Message> for Message[src]

impl Serialize for Message[src]

impl StructuralEq for Message[src]

impl StructuralPartialEq for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

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> Instrument for T[src]

impl<T> Instrument 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>, 

impl<T> WithSubscriber for T[src]