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

pub struct ChannelNumber(_);

CHANNEL-NUMBER attribute.

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

Methods

impl ChannelNumber
[src]

CODEPOINT: u16 = 12

The codepoint of the type of the attribute.

MIN: u16 = 16384

Minimum channel number.

MAX: u16 = 32767

Maximum channel number.

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.

Returns the channel number indicated by the attribute.

Trait Implementations

impl Debug for ChannelNumber
[src]

Formats the value using the given formatter. Read more

impl Clone for ChannelNumber
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for ChannelNumber
[src]

impl PartialEq for ChannelNumber
[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 ChannelNumber
[src]

impl Hash for ChannelNumber
[src]

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

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

impl PartialOrd for ChannelNumber
[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 ChannelNumber
[src]

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Attribute for ChannelNumber
[src]

The decoder of the value part of the attribute.

The encoder of the value part of the attribute.

Returns the type of the attribute.

This method is called before encoding the attribute. Read more

This method is called after decoding the attribute and before being appended to the given message. Read more

impl From<ChannelNumber> for Attribute
[src]

Performs the conversion.

impl TryAsRef<ChannelNumber> for Attribute
[src]

Attempts to convert self to a reference to T. Read more

Auto Trait Implementations