Struct stun_codec::rfc5766::attributes::ReservationToken [−][src]
pub struct ReservationToken(_);
RESERVATION-TOKEN
attribute.
See RFC 5766 -- 14.9. RESERVATION-TOKEN about this attribute.
Methods
impl ReservationToken
[src]
impl ReservationToken
pub const CODEPOINT: u16
CODEPOINT: u16 = 34
The codepoint of the type of the attribute.
pub fn new(token: u64) -> Self
[src]
pub fn new(token: u64) -> Self
Makes a new ReservationToken
instance.
pub fn token(&self) -> u64
[src]
pub fn token(&self) -> u64
Returns the token value contained by the attribute.
Trait Implementations
impl Debug for ReservationToken
[src]
impl Debug for ReservationToken
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for ReservationToken
[src]
impl Clone for ReservationToken
fn clone(&self) -> ReservationToken
[src]
fn clone(&self) -> ReservationToken
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for ReservationToken
[src]
impl PartialEq for ReservationToken
fn eq(&self, other: &ReservationToken) -> bool
[src]
fn eq(&self, other: &ReservationToken) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ReservationToken) -> bool
[src]
fn ne(&self, other: &ReservationToken) -> bool
This method tests for !=
.
impl Eq for ReservationToken
[src]
impl Eq for ReservationToken
impl Hash for ReservationToken
[src]
impl Hash for ReservationToken
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Attribute for ReservationToken
[src]
impl Attribute for ReservationToken
type Decoder = ReservationTokenDecoder
The decoder of the value part of the attribute.
type Encoder = ReservationTokenEncoder
The encoder of the value part of the attribute.
fn get_type(&self) -> AttributeType
[src]
fn get_type(&self) -> AttributeType
Returns the type of the attribute.
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called before encoding the attribute. Read more
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called after decoding the attribute and before being appended to the given message. Read more
impl From<ReservationToken> for Attribute
[src]
impl From<ReservationToken> for Attribute
fn from(f: ReservationToken) -> Self
[src]
fn from(f: ReservationToken) -> Self
Performs the conversion.
impl TryAsRef<ReservationToken> for Attribute
[src]
impl TryAsRef<ReservationToken> for Attribute
fn try_as_ref(&self) -> Option<&ReservationToken>
[src]
fn try_as_ref(&self) -> Option<&ReservationToken>
Attempts to convert self
to a reference to T
. Read more
Auto Trait Implementations
impl Send for ReservationToken
impl Send for ReservationToken
impl Sync for ReservationToken
impl Sync for ReservationToken