pub struct MessageHeader<'a> {
    pub bits: u8,
    pub msg_type: u16,
    pub msg_length: u16,
    pub cookie: &'a [u8; 4],
    pub transaction_id: &'a [u8; 12],
}
Expand description

The STUN message header

Fields

bits: u8

The value of the most significant 2 bits

msg_type: u16

Message type

msg_length: u16

Message length

cookie: &'a [u8; 4]

Magic cookie

transaction_id: &'a [u8; 12]

Transaction Id

Trait Implementations

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.