Struct stun_codec::rfc5389::attributes::Fingerprint [−][src]
pub struct Fingerprint { /* fields omitted */ }
FINGERPRINT
attribute.
See RFC 5389 -- 15.5. FINGERPRINT about this attribute.
Methods
impl Fingerprint
[src]
impl Fingerprint
pub const CODEPOINT: u16
CODEPOINT: u16 = 32808
The codepoint of the type of the attribute.
pub fn new<A: Attribute>(message: Message<A>) -> Result<Self>
[src]
pub fn new<A: Attribute>(message: Message<A>) -> Result<Self>
Calculates the CRC-32 value of message
and returns a Fingerprint
instance containing it.
pub fn crc32(&self) -> u32
[src]
pub fn crc32(&self) -> u32
Returns the crc32 value of this instance.
Trait Implementations
impl Debug for Fingerprint
[src]
impl Debug for Fingerprint
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 Fingerprint
[src]
impl Clone for Fingerprint
fn clone(&self) -> Fingerprint
[src]
fn clone(&self) -> Fingerprint
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 Fingerprint
[src]
impl PartialEq for Fingerprint
fn eq(&self, other: &Fingerprint) -> bool
[src]
fn eq(&self, other: &Fingerprint) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Fingerprint) -> bool
[src]
fn ne(&self, other: &Fingerprint) -> bool
This method tests for !=
.
impl Eq for Fingerprint
[src]
impl Eq for Fingerprint
impl Hash for Fingerprint
[src]
impl Hash for Fingerprint
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 Fingerprint
[src]
impl Attribute for Fingerprint
type Decoder = FingerprintDecoder
The decoder of the value part of the attribute.
type Encoder = FingerprintEncoder
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 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
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
impl From<Fingerprint> for Attribute
[src]
impl From<Fingerprint> for Attribute
fn from(f: Fingerprint) -> Self
[src]
fn from(f: Fingerprint) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for Fingerprint
impl Send for Fingerprint
impl Sync for Fingerprint
impl Sync for Fingerprint