Struct stun_codec::rfc5766::attributes::ChannelNumber[][src]

pub struct ChannelNumber(_);

CHANNEL-NUMBER attribute.

See RFC 5766 -- 14.1. CHANNEL-NUMBER about this attribute.

Implementations

impl ChannelNumber[src]

pub const CODEPOINT: u16[src]

The codepoint of the type of the attribute.

pub const MIN: u16[src]

Minimum channel number.

pub const MAX: u16[src]

Maximum channel number.

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

Makes a new ChannelNumber instance.

Errors

If n is not a number between ChannelNumber::MIN and ChannelNumber::MAX, this will return an ErrorKind::InvalidInput error.

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

Returns the channel number indicated by the attribute.

pub fn min() -> Self[src]

Returns the minimum channel number.

pub fn max() -> Self[src]

Returns the maximum channel number.

pub fn wrapping_increment(self) -> Self[src]

Wrapping incrementation.

Trait Implementations

impl Attribute for ChannelNumber[src]

type Decoder = ChannelNumberDecoder

The decoder of the value part of the attribute.

type Encoder = ChannelNumberEncoder

The encoder of the value part of the attribute.

impl Clone for ChannelNumber[src]

impl Copy for ChannelNumber[src]

impl Debug for ChannelNumber[src]

impl Eq for ChannelNumber[src]

impl From<ChannelNumber> for Attribute[src]

impl Hash for ChannelNumber[src]

impl Ord for ChannelNumber[src]

impl PartialEq<ChannelNumber> for ChannelNumber[src]

impl PartialOrd<ChannelNumber> for ChannelNumber[src]

impl StructuralEq for ChannelNumber[src]

impl StructuralPartialEq for ChannelNumber[src]

impl TryAsRef<ChannelNumber> for Attribute[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.