Enum stun_codec::rfc5389::Attribute [−][src]
pub enum Attribute { MappedAddress(MappedAddress), Username(Username), MessageIntegrity(MessageIntegrity), ErrorCode(ErrorCode), UnknownAttributes(UnknownAttributes), Realm(Realm), Nonce(Nonce), XorMappedAddress(XorMappedAddress), Software(Software), AlternateServer(AlternateServer), Fingerprint(Fingerprint), }
Attribute set.
Variants
MappedAddress(MappedAddress)
Username(Username)
MessageIntegrity(MessageIntegrity)
ErrorCode(ErrorCode)
UnknownAttributes(UnknownAttributes)
Realm(Realm)
Nonce(Nonce)
XorMappedAddress(XorMappedAddress)
Software(Software)
AlternateServer(AlternateServer)
Fingerprint(Fingerprint)
Trait Implementations
impl Debug for Attribute
[src]
impl Debug for Attribute
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 Attribute
[src]
impl Clone for Attribute
fn clone(&self) -> Attribute
[src]
fn clone(&self) -> Attribute
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 Attribute
[src]
impl PartialEq for Attribute
fn eq(&self, other: &Attribute) -> bool
[src]
fn eq(&self, other: &Attribute) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Attribute) -> bool
[src]
fn ne(&self, other: &Attribute) -> bool
This method tests for !=
.
impl Eq for Attribute
[src]
impl Eq for Attribute
impl Hash for Attribute
[src]
impl Hash for Attribute
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 From<MappedAddress> for Attribute
[src]
impl From<MappedAddress> for Attribute
fn from(f: MappedAddress) -> Self
[src]
fn from(f: MappedAddress) -> Self
Performs the conversion.
impl From<Username> for Attribute
[src]
impl From<Username> for Attribute
impl From<MessageIntegrity> for Attribute
[src]
impl From<MessageIntegrity> for Attribute
fn from(f: MessageIntegrity) -> Self
[src]
fn from(f: MessageIntegrity) -> Self
Performs the conversion.
impl From<ErrorCode> for Attribute
[src]
impl From<ErrorCode> for Attribute
impl From<UnknownAttributes> for Attribute
[src]
impl From<UnknownAttributes> for Attribute
fn from(f: UnknownAttributes) -> Self
[src]
fn from(f: UnknownAttributes) -> Self
Performs the conversion.
impl From<Realm> for Attribute
[src]
impl From<Realm> for Attribute
impl From<Nonce> for Attribute
[src]
impl From<Nonce> for Attribute
impl From<XorMappedAddress> for Attribute
[src]
impl From<XorMappedAddress> for Attribute
fn from(f: XorMappedAddress) -> Self
[src]
fn from(f: XorMappedAddress) -> Self
Performs the conversion.
impl From<Software> for Attribute
[src]
impl From<Software> for Attribute
impl From<AlternateServer> for Attribute
[src]
impl From<AlternateServer> for Attribute
fn from(f: AlternateServer) -> Self
[src]
fn from(f: AlternateServer) -> Self
Performs the conversion.
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.
impl TryAsRef<MappedAddress> for Attribute
[src]
impl TryAsRef<MappedAddress> for Attribute
fn try_as_ref(&self) -> Option<&MappedAddress>
[src]
fn try_as_ref(&self) -> Option<&MappedAddress>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<Username> for Attribute
[src]
impl TryAsRef<Username> for Attribute
fn try_as_ref(&self) -> Option<&Username>
[src]
fn try_as_ref(&self) -> Option<&Username>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<MessageIntegrity> for Attribute
[src]
impl TryAsRef<MessageIntegrity> for Attribute
fn try_as_ref(&self) -> Option<&MessageIntegrity>
[src]
fn try_as_ref(&self) -> Option<&MessageIntegrity>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<ErrorCode> for Attribute
[src]
impl TryAsRef<ErrorCode> for Attribute
fn try_as_ref(&self) -> Option<&ErrorCode>
[src]
fn try_as_ref(&self) -> Option<&ErrorCode>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<UnknownAttributes> for Attribute
[src]
impl TryAsRef<UnknownAttributes> for Attribute
fn try_as_ref(&self) -> Option<&UnknownAttributes>
[src]
fn try_as_ref(&self) -> Option<&UnknownAttributes>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<Realm> for Attribute
[src]
impl TryAsRef<Realm> for Attribute
fn try_as_ref(&self) -> Option<&Realm>
[src]
fn try_as_ref(&self) -> Option<&Realm>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<Nonce> for Attribute
[src]
impl TryAsRef<Nonce> for Attribute
fn try_as_ref(&self) -> Option<&Nonce>
[src]
fn try_as_ref(&self) -> Option<&Nonce>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<XorMappedAddress> for Attribute
[src]
impl TryAsRef<XorMappedAddress> for Attribute
fn try_as_ref(&self) -> Option<&XorMappedAddress>
[src]
fn try_as_ref(&self) -> Option<&XorMappedAddress>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<Software> for Attribute
[src]
impl TryAsRef<Software> for Attribute
fn try_as_ref(&self) -> Option<&Software>
[src]
fn try_as_ref(&self) -> Option<&Software>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<AlternateServer> for Attribute
[src]
impl TryAsRef<AlternateServer> for Attribute
fn try_as_ref(&self) -> Option<&AlternateServer>
[src]
fn try_as_ref(&self) -> Option<&AlternateServer>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<Fingerprint> for Attribute
[src]
impl TryAsRef<Fingerprint> for Attribute
fn try_as_ref(&self) -> Option<&Fingerprint>
[src]
fn try_as_ref(&self) -> Option<&Fingerprint>
Attempts to convert self
to a reference to T
. Read more
impl Attribute for Attribute
[src]
impl Attribute for Attribute
type Decoder = AttributeDecoder
The decoder of the value part of the attribute.
type Encoder = AttributeEncoder
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>(&mut self, message: &Message<A>) -> Result<()> where
A: Attribute,
[src]
fn before_encode<A>(&mut self, message: &Message<A>) -> Result<()> where
A: Attribute,
This method is called before encoding the attribute. Read more
fn after_decode<A>(&mut self, message: &Message<A>) -> Result<()> where
A: Attribute,
[src]
fn after_decode<A>(&mut self, message: &Message<A>) -> Result<()> where
A: Attribute,
This method is called after decoding the attribute and before being appended to the given message. Read more