pub struct StunMessage { /* private fields */ }
Expand description

The stun message is the basic unit of information interchanged between two agents implementing the STUN protocol.

All STUN messages comprise a 20-byte header followed by zero or more attributes. The STUN header contains a STUN message type, message length, magic cookie, and transaction ID.

STUN messages can be created using the StunMessageBuilder.

Implementations

Returns the message method.

Returns the message class

Returns the transaction-id

Returns the attributes contained in this STUN message.

Returns the attribute if the message contains the attribute type or None if there is no such attribute. If there are more than one attributes of this type, this function will return the first one.

Trait Implementations

Formats the value using the given formatter. Read more

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.