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

pub struct Lifetime(_);

LIFETIME attribute.

See RFC 5766 -- 14.2. LIFETIME about this attribute.

Methods

impl Lifetime
[src]

CODEPOINT: u16 = 13

The codepoint of the type of the attribute.

Makes a new Lifetime instance.

Note that the nanoseconds part of lifetime is ignored and always set to 0.

Errors

If the seconds part of lifetime is greater than 0xFFFF_FFFF, this function will return an ErrorKind::InvalidInput error.

Makes a new Lifetime instance from u32 value.

Returns the lifetime indicated by the attribute.

Trait Implementations

impl Debug for Lifetime
[src]

Formats the value using the given formatter. Read more

impl Clone for Lifetime
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

impl Hash for Lifetime
[src]

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

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

impl Attribute for Lifetime
[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<Lifetime> for Attribute
[src]

Performs the conversion.

impl TryAsRef<Lifetime> for Attribute
[src]

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

Auto Trait Implementations

impl Send for Lifetime

impl Sync for Lifetime