Enum stun_codec::rfc5766::Attribute [−][src]
pub enum Attribute { ChannelNumber(ChannelNumber), Lifetime(Lifetime), XorPeerAddress(XorPeerAddress), Data(Data), XorRelayAddress(XorRelayAddress), EvenPort(EvenPort), RequestedTransport(RequestedTransport), DontFragment(DontFragment), ReservationToken(ReservationToken), }
Attribute set.
Variants
ChannelNumber(ChannelNumber)
Lifetime(Lifetime)
XorPeerAddress(XorPeerAddress)
Data(Data)
XorRelayAddress(XorRelayAddress)
EvenPort(EvenPort)
RequestedTransport(RequestedTransport)
DontFragment(DontFragment)
ReservationToken(ReservationToken)
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<ChannelNumber> for Attribute
[src]
impl From<ChannelNumber> for Attribute
fn from(f: ChannelNumber) -> Self
[src]
fn from(f: ChannelNumber) -> Self
Performs the conversion.
impl From<Lifetime> for Attribute
[src]
impl From<Lifetime> for Attribute
impl From<XorPeerAddress> for Attribute
[src]
impl From<XorPeerAddress> for Attribute
fn from(f: XorPeerAddress) -> Self
[src]
fn from(f: XorPeerAddress) -> Self
Performs the conversion.
impl From<Data> for Attribute
[src]
impl From<Data> for Attribute
impl From<XorRelayAddress> for Attribute
[src]
impl From<XorRelayAddress> for Attribute
fn from(f: XorRelayAddress) -> Self
[src]
fn from(f: XorRelayAddress) -> Self
Performs the conversion.
impl From<EvenPort> for Attribute
[src]
impl From<EvenPort> for Attribute
impl From<RequestedTransport> for Attribute
[src]
impl From<RequestedTransport> for Attribute
fn from(f: RequestedTransport) -> Self
[src]
fn from(f: RequestedTransport) -> Self
Performs the conversion.
impl From<DontFragment> for Attribute
[src]
impl From<DontFragment> for Attribute
fn from(f: DontFragment) -> Self
[src]
fn from(f: DontFragment) -> Self
Performs the conversion.
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<ChannelNumber> for Attribute
[src]
impl TryAsRef<ChannelNumber> for Attribute
fn try_as_ref(&self) -> Option<&ChannelNumber>
[src]
fn try_as_ref(&self) -> Option<&ChannelNumber>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<Lifetime> for Attribute
[src]
impl TryAsRef<Lifetime> for Attribute
fn try_as_ref(&self) -> Option<&Lifetime>
[src]
fn try_as_ref(&self) -> Option<&Lifetime>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<XorPeerAddress> for Attribute
[src]
impl TryAsRef<XorPeerAddress> for Attribute
fn try_as_ref(&self) -> Option<&XorPeerAddress>
[src]
fn try_as_ref(&self) -> Option<&XorPeerAddress>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<Data> for Attribute
[src]
impl TryAsRef<Data> for Attribute
fn try_as_ref(&self) -> Option<&Data>
[src]
fn try_as_ref(&self) -> Option<&Data>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<XorRelayAddress> for Attribute
[src]
impl TryAsRef<XorRelayAddress> for Attribute
fn try_as_ref(&self) -> Option<&XorRelayAddress>
[src]
fn try_as_ref(&self) -> Option<&XorRelayAddress>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<EvenPort> for Attribute
[src]
impl TryAsRef<EvenPort> for Attribute
fn try_as_ref(&self) -> Option<&EvenPort>
[src]
fn try_as_ref(&self) -> Option<&EvenPort>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<RequestedTransport> for Attribute
[src]
impl TryAsRef<RequestedTransport> for Attribute
fn try_as_ref(&self) -> Option<&RequestedTransport>
[src]
fn try_as_ref(&self) -> Option<&RequestedTransport>
Attempts to convert self
to a reference to T
. Read more
impl TryAsRef<DontFragment> for Attribute
[src]
impl TryAsRef<DontFragment> for Attribute
fn try_as_ref(&self) -> Option<&DontFragment>
[src]
fn try_as_ref(&self) -> Option<&DontFragment>
Attempts to convert self
to a reference to T
. Read more
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
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