Struct rustun::attribute::Type [] [src]

pub struct Type(_);

Attribute type.

Attributes are divided into two types: comprehension-required and comprehension-optional. STUN agents can safely ignore comprehension-optional attributes they don't understand, but cannot successfully process a message if it contains comprehension-required attributes that are not understood.

RFC 5389 -- 5. Definitions


A STUN Attribute type is a hex number in the range 0x0000 - 0xFFFF. STUN attribute types in the range 0x0000 - 0x7FFF are considered comprehension-required; STUN attribute types in the range 0x8000 - 0xFFFF are considered comprehension-optional.

RFC 5389 -- 18.2. STUN Attribute Registry

Methods

impl Type
[src]

Makes a new Type instance which corresponding to codepoint.

Returns the attribute codepoint corresponding this instance.

Returns true if this is a comprehension-required type.

Returns true if this is a comprehension-optional type.

Trait Implementations

impl Debug for Type
[src]

Formats the value using the given formatter.

impl Clone for Type
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Type
[src]

impl PartialOrd for Type
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Type
[src]

This method returns an Ordering between self and other. Read more

impl PartialEq for Type
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Type
[src]

impl Hash for Type
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl From<u16> for Type
[src]

Performs the conversion.