Struct stun::addr::MappedAddress[][src]

pub struct MappedAddress {
    pub ip: IpAddr,
    pub port: u16,
}
Expand description

MappedAddress represents MAPPED-ADDRESS attribute.

This attribute is used only by servers for achieving backwards compatibility with RFC 3489 clients.

RFC 5389 Section 15.1

Fields

ip: IpAddrport: u16

Implementations

get_from_as decodes MAPPED-ADDRESS value in message m as an attribute of type t.

add_to_as adds MAPPED-ADDRESS value to m as t attribute.

Trait Implementations

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

get_from decodes MAPPED-ADDRESS from message.

add_to adds MAPPED-ADDRESS to message.

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

Performs the conversion.

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

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.