Struct stun_codec::rfc5389::attributes::Nonce [−][src]
pub struct Nonce { /* fields omitted */ }
NONCE
attribute.
See RFC 5389 -- 15.8. NONCE about this attribute.
TODO
- Support [RFC 3261] and [RFC 2617]
Methods
impl Nonce
[src]
impl Nonce
pub const CODEPOINT: u16
CODEPOINT: u16 = 21
The codepoint of the type of the attribute.
pub fn new(value: String) -> Result<Self>
[src]
pub fn new(value: String) -> Result<Self>
Makes a new Nonce
instance.
Errors
The length of value
must be less than 128
characters.
If it is too long, this will return an ErrorKind::InvalidInput
error.
pub fn value(&self) -> &str
[src]
pub fn value(&self) -> &str
Returns the value of this instance.
Trait Implementations
impl Debug for Nonce
[src]
impl Debug for Nonce
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 Nonce
[src]
impl Clone for Nonce
fn clone(&self) -> Nonce
[src]
fn clone(&self) -> Nonce
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 Nonce
[src]
impl PartialEq for Nonce
fn eq(&self, other: &Nonce) -> bool
[src]
fn eq(&self, other: &Nonce) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Nonce) -> bool
[src]
fn ne(&self, other: &Nonce) -> bool
This method tests for !=
.
impl Eq for Nonce
[src]
impl Eq for Nonce
impl Hash for Nonce
[src]
impl Hash for Nonce
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 Nonce
[src]
impl Attribute for Nonce
type Decoder = NonceDecoder
The decoder of the value part of the attribute.
type Encoder = NonceEncoder
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<Nonce> for Attribute
[src]
impl From<Nonce> for Attribute