Struct stun_codec::Method[][src]

pub struct Method(_);

STUN method.

All STUN messages start with a fixed header that includes a method, a class, and the transaction ID. The method indicates which of the various requests or indications this is;

RFC 5389 -- 3. Overview of Operation

Implementations

impl Method[src]

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

Makes a new Method instance with the given codepoint.

Errors

If codepoint is greater than 0xFFF, this will return an ErrorKind::InvalidInput error.

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

Returns the codepoint corresponding this method.

Trait Implementations

impl Clone for Method[src]

impl Copy for Method[src]

impl Debug for Method[src]

impl Eq for Method[src]

impl From<u8> for Method[src]

impl Hash for Method[src]

impl Ord for Method[src]

impl PartialEq<Method> for Method[src]

impl PartialOrd<Method> for Method[src]

impl StructuralEq for Method[src]

impl StructuralPartialEq for Method[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.