Attribute

Enum Attribute 

Source
pub enum Attribute {
Show 21 variants MappedAddress(MappedAddress), Username(Username), MessageIntegrity(MessageIntegrity), ErrorCode(ErrorCode), UnknownAttributes(UnknownAttributes), Realm(Realm), Nonce(Nonce), XorMappedAddress(XorMappedAddress), Software(Software), AlternateServer(AlternateServer), Fingerprint(Fingerprint), ChannelNumber(ChannelNumber), Lifetime(Lifetime), XorPeerAddress(XorPeerAddress), Data(Data), XorRelayAddress(XorRelayAddress), EvenPort(EvenPort), RequestedTransport(RequestedTransport), DontFragment(DontFragment), ReservationToken(ReservationToken), RequestedAddressFamily(RequestedAddressFamily),
}
Expand description

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)

§

ChannelNumber(ChannelNumber)

§

Lifetime(Lifetime)

§

XorPeerAddress(XorPeerAddress)

§

Data(Data)

§

XorRelayAddress(XorRelayAddress)

§

EvenPort(EvenPort)

§

RequestedTransport(RequestedTransport)

§

DontFragment(DontFragment)

§

ReservationToken(ReservationToken)

§

RequestedAddressFamily(RequestedAddressFamily)

Trait Implementations§

Source§

impl Attribute for Attribute

Source§

type Decoder = AttributeDecoder

The decoder of the value part of the attribute.
Source§

type Encoder = AttributeEncoder

The encoder of the value part of the attribute.
Source§

fn get_type(&self) -> AttributeType

Returns the type of the attribute.
Source§

fn before_encode<A>(&mut self, message: &Message<A>) -> Result<()>
where A: Attribute,

This method is called before encoding the attribute. Read more
Source§

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
Source§

impl Clone for Attribute

Source§

fn clone(&self) -> Attribute

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Attribute

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<AlternateServer> for Attribute

Source§

fn from(f: AlternateServer) -> Self

Converts to this type from the input type.
Source§

impl From<ChannelNumber> for Attribute

Source§

fn from(f: ChannelNumber) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for Attribute

Source§

fn from(f: Data) -> Self

Converts to this type from the input type.
Source§

impl From<DontFragment> for Attribute

Source§

fn from(f: DontFragment) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorCode> for Attribute

Source§

fn from(f: ErrorCode) -> Self

Converts to this type from the input type.
Source§

impl From<EvenPort> for Attribute

Source§

fn from(f: EvenPort) -> Self

Converts to this type from the input type.
Source§

impl From<Fingerprint> for Attribute

Source§

fn from(f: Fingerprint) -> Self

Converts to this type from the input type.
Source§

impl From<Lifetime> for Attribute

Source§

fn from(f: Lifetime) -> Self

Converts to this type from the input type.
Source§

impl From<MappedAddress> for Attribute

Source§

fn from(f: MappedAddress) -> Self

Converts to this type from the input type.
Source§

impl From<MessageIntegrity> for Attribute

Source§

fn from(f: MessageIntegrity) -> Self

Converts to this type from the input type.
Source§

impl From<Nonce> for Attribute

Source§

fn from(f: Nonce) -> Self

Converts to this type from the input type.
Source§

impl From<Realm> for Attribute

Source§

fn from(f: Realm) -> Self

Converts to this type from the input type.
Source§

impl From<RequestedAddressFamily> for Attribute

Source§

fn from(f: RequestedAddressFamily) -> Self

Converts to this type from the input type.
Source§

impl From<RequestedTransport> for Attribute

Source§

fn from(f: RequestedTransport) -> Self

Converts to this type from the input type.
Source§

impl From<ReservationToken> for Attribute

Source§

fn from(f: ReservationToken) -> Self

Converts to this type from the input type.
Source§

impl From<Software> for Attribute

Source§

fn from(f: Software) -> Self

Converts to this type from the input type.
Source§

impl From<UnknownAttributes> for Attribute

Source§

fn from(f: UnknownAttributes) -> Self

Converts to this type from the input type.
Source§

impl From<Username> for Attribute

Source§

fn from(f: Username) -> Self

Converts to this type from the input type.
Source§

impl From<XorMappedAddress> for Attribute

Source§

fn from(f: XorMappedAddress) -> Self

Converts to this type from the input type.
Source§

impl From<XorPeerAddress> for Attribute

Source§

fn from(f: XorPeerAddress) -> Self

Converts to this type from the input type.
Source§

impl From<XorRelayAddress> for Attribute

Source§

fn from(f: XorRelayAddress) -> Self

Converts to this type from the input type.
Source§

impl Hash for Attribute

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Attribute

Source§

fn eq(&self, other: &Attribute) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryAsRef<AlternateServer> for Attribute

Source§

fn try_as_ref(&self) -> Option<&AlternateServer>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<ChannelNumber> for Attribute

Source§

fn try_as_ref(&self) -> Option<&ChannelNumber>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<Data> for Attribute

Source§

fn try_as_ref(&self) -> Option<&Data>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<DontFragment> for Attribute

Source§

fn try_as_ref(&self) -> Option<&DontFragment>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<ErrorCode> for Attribute

Source§

fn try_as_ref(&self) -> Option<&ErrorCode>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<EvenPort> for Attribute

Source§

fn try_as_ref(&self) -> Option<&EvenPort>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<Fingerprint> for Attribute

Source§

fn try_as_ref(&self) -> Option<&Fingerprint>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<Lifetime> for Attribute

Source§

fn try_as_ref(&self) -> Option<&Lifetime>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<MappedAddress> for Attribute

Source§

fn try_as_ref(&self) -> Option<&MappedAddress>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<MessageIntegrity> for Attribute

Source§

fn try_as_ref(&self) -> Option<&MessageIntegrity>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<Nonce> for Attribute

Source§

fn try_as_ref(&self) -> Option<&Nonce>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<Realm> for Attribute

Source§

fn try_as_ref(&self) -> Option<&Realm>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<RequestedAddressFamily> for Attribute

Source§

fn try_as_ref(&self) -> Option<&RequestedAddressFamily>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<RequestedTransport> for Attribute

Source§

fn try_as_ref(&self) -> Option<&RequestedTransport>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<ReservationToken> for Attribute

Source§

fn try_as_ref(&self) -> Option<&ReservationToken>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<Software> for Attribute

Source§

fn try_as_ref(&self) -> Option<&Software>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<UnknownAttributes> for Attribute

Source§

fn try_as_ref(&self) -> Option<&UnknownAttributes>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<Username> for Attribute

Source§

fn try_as_ref(&self) -> Option<&Username>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<XorMappedAddress> for Attribute

Source§

fn try_as_ref(&self) -> Option<&XorMappedAddress>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<XorPeerAddress> for Attribute

Source§

fn try_as_ref(&self) -> Option<&XorPeerAddress>

Attempts to convert self to a reference to T. Read more
Source§

impl TryAsRef<XorRelayAddress> for Attribute

Source§

fn try_as_ref(&self) -> Option<&XorRelayAddress>

Attempts to convert self to a reference to T. Read more
Source§

impl Eq for Attribute

Source§

impl StructuralPartialEq for Attribute

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V