Struct stun_codec::AttributeType[][src]

pub struct AttributeType(_);

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

Implementations

impl AttributeType[src]

pub fn new(codepoint: u16) -> Self[src]

Makes a new Type instance which corresponding to codepoint.

pub fn as_u16(self) -> u16[src]

Returns the attribute codepoint corresponding this instance.

pub fn is_comprehension_required(self) -> bool[src]

Returns true if this is a comprehension-required type.

pub fn is_comprehension_optional(self) -> bool[src]

Returns true if this is a comprehension-optional type.

Trait Implementations

impl Clone for AttributeType[src]

impl Copy for AttributeType[src]

impl Debug for AttributeType[src]

impl Eq for AttributeType[src]

impl From<u16> for AttributeType[src]

impl Hash for AttributeType[src]

impl Ord for AttributeType[src]

impl PartialEq<AttributeType> for AttributeType[src]

impl PartialOrd<AttributeType> for AttributeType[src]

impl StructuralEq for AttributeType[src]

impl StructuralPartialEq for AttributeType[src]

Auto Trait Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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.