stun_rs::attributes

Enum StunAttribute

source
pub enum StunAttribute {
Show 39 variants Unknown(Unknown), AlternateServer(AlternateServer), ErrorCode(ErrorCode), Fingerprint(Fingerprint), MappedAddress(MappedAddress), MessageIntegrity(MessageIntegrity), MessageIntegritySha256(MessageIntegritySha256), Nonce(Nonce), PasswordAlgorithm(PasswordAlgorithm), PasswordAlgorithms(PasswordAlgorithms), Realm(Realm), Software(Software), UnknownAttributes(UnknownAttributes), UserHash(UserHash), UserName(UserName), XorMappedAddress(XorMappedAddress), IceControlled(IceControlled), IceControlling(IceControlling), Priority(Priority), UseCandidate(UseCandidate), ChannelNumber(ChannelNumber), LifeTime(LifeTime), XorPeerAddress(XorPeerAddress), XorRelayedAddress(XorRelayedAddress), Data(Data), RequestedAddressFamily(RequestedAddressFamily), EvenPort(EvenPort), DontFragment(DontFragment), RequestedTrasport(RequestedTrasport), AdditionalAddressFamily(AdditionalAddressFamily), ReservationToken(ReservationToken), AddressErrorCode(AddressErrorCode), Icmp(Icmp), MobilityTicket(MobilityTicket), ChangeRequest(ChangeRequest), OtherAddress(OtherAddress), Padding(Padding), ResponseOrigin(ResponseOrigin), ResponsePort(ResponsePort),
}
Expand description

STUN Attributes that can be attached to a StunMessage

Variants§

§

Unknown(Unknown)

The Unknownatribute

§

AlternateServer(AlternateServer)

The AlternateServeratribute

§

ErrorCode(ErrorCode)

The ErrorCodeatribute

§

Fingerprint(Fingerprint)

The Fingerprintatribute

§

MappedAddress(MappedAddress)

The MappedAddressatribute

§

MessageIntegrity(MessageIntegrity)

The MessageIntegrityatribute

§

MessageIntegritySha256(MessageIntegritySha256)

The MessageIntegritySha256atribute

§

Nonce(Nonce)

The Nonceatribute

§

PasswordAlgorithm(PasswordAlgorithm)

The PasswordAlgorithmatribute

§

PasswordAlgorithms(PasswordAlgorithms)

The PasswordAlgorithmsatribute

§

Realm(Realm)

The Realmatribute

§

Software(Software)

The Softwareatribute

§

UnknownAttributes(UnknownAttributes)

The UnknownAttributesatribute

§

UserHash(UserHash)

The UserHashatribute

§

UserName(UserName)

The UserNameatribute

§

XorMappedAddress(XorMappedAddress)

The XorMappedAddressatribute

§

IceControlled(IceControlled)

The IceControlledatribute

§

IceControlling(IceControlling)

The IceControllingatribute

§

Priority(Priority)

The Priorityatribute

§

UseCandidate(UseCandidate)

The UseCandidateatribute

§

ChannelNumber(ChannelNumber)

The ChannelNumberatribute

§

LifeTime(LifeTime)

The LifeTimeatribute

§

XorPeerAddress(XorPeerAddress)

The XorPeerAddressatribute

§

XorRelayedAddress(XorRelayedAddress)

The XorRelayedAddressatribute

§

Data(Data)

The Dataatribute

§

RequestedAddressFamily(RequestedAddressFamily)

The RequestedAddressFamilyatribute

§

EvenPort(EvenPort)

The EvenPortatribute

§

DontFragment(DontFragment)

The DontFragmentatribute

§

RequestedTrasport(RequestedTrasport)

The RequestedTrasportatribute

§

AdditionalAddressFamily(AdditionalAddressFamily)

The AdditionalAddressFamilyatribute

§

ReservationToken(ReservationToken)

The ReservationTokenatribute

§

AddressErrorCode(AddressErrorCode)

The AddressErrorCodeatribute

§

Icmp(Icmp)

The Icmpatribute

§

MobilityTicket(MobilityTicket)

The MobilityTicketatribute

§

ChangeRequest(ChangeRequest)

The ChangeRequestatribute

§

OtherAddress(OtherAddress)

The OtherAddressatribute

§

Padding(Padding)

The Paddingatribute

§

ResponseOrigin(ResponseOrigin)

The ResponseOriginatribute

§

ResponsePort(ResponsePort)

The ResponsePortatribute

Implementations§

source§

impl StunAttribute

source

pub fn attribute_type(&self) -> AttributeType

Returns the STUN attribute type of this instance.

source

pub fn is_unknown(&self) -> bool

Returns true if this StunAttribute is Unknown

source

pub fn as_unknown(&self) -> Result<&Unknown, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Unknown

source

pub fn expect_unknown(&self) -> &Unknown

Returns a reference to the Unknown attribute.

§Panics

Panics if the attribute is not an Unknown

source

pub fn is_alternate_server(&self) -> bool

Returns true if this StunAttribute is AlternateServer

source

pub fn as_alternate_server(&self) -> Result<&AlternateServer, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not AlternateServer

source

pub fn expect_alternate_server(&self) -> &AlternateServer

Returns a reference to the AlternateServer attribute.

§Panics

Panics if the attribute is not an AlternateServer

source

pub fn is_error_code(&self) -> bool

Returns true if this StunAttribute is ErrorCode

source

pub fn as_error_code(&self) -> Result<&ErrorCode, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not ErrorCode

source

pub fn expect_error_code(&self) -> &ErrorCode

Returns a reference to the ErrorCode attribute.

§Panics

Panics if the attribute is not an ErrorCode

source

pub fn is_fingerprint(&self) -> bool

Returns true if this StunAttribute is Fingerprint

source

pub fn as_fingerprint(&self) -> Result<&Fingerprint, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Fingerprint

source

pub fn expect_fingerprint(&self) -> &Fingerprint

Returns a reference to the Fingerprint attribute.

§Panics

Panics if the attribute is not an Fingerprint

source

pub fn is_mapped_address(&self) -> bool

Returns true if this StunAttribute is MappedAddress

source

pub fn as_mapped_address(&self) -> Result<&MappedAddress, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not MappedAddress

source

pub fn expect_mapped_address(&self) -> &MappedAddress

Returns a reference to the MappedAddress attribute.

§Panics

Panics if the attribute is not an MappedAddress

source

pub fn is_message_integrity(&self) -> bool

Returns true if this StunAttribute is MessageIntegrity

source

pub fn as_message_integrity(&self) -> Result<&MessageIntegrity, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not MessageIntegrity

source

pub fn expect_message_integrity(&self) -> &MessageIntegrity

Returns a reference to the MessageIntegrity attribute.

§Panics

Panics if the attribute is not an MessageIntegrity

source

pub fn is_message_integrity_sha256(&self) -> bool

Returns true if this StunAttribute is MessageIntegritySha256

source

pub fn as_message_integrity_sha256( &self, ) -> Result<&MessageIntegritySha256, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not MessageIntegritySha256

source

pub fn expect_message_integrity_sha256(&self) -> &MessageIntegritySha256

Returns a reference to the MessageIntegritySha256 attribute.

§Panics

Panics if the attribute is not an MessageIntegritySha256

source

pub fn is_nonce(&self) -> bool

Returns true if this StunAttribute is Nonce

source

pub fn as_nonce(&self) -> Result<&Nonce, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Nonce

source

pub fn expect_nonce(&self) -> &Nonce

Returns a reference to the Nonce attribute.

§Panics

Panics if the attribute is not an Nonce

source

pub fn is_password_algorithm(&self) -> bool

Returns true if this StunAttribute is PasswordAlgorithm

source

pub fn as_password_algorithm(&self) -> Result<&PasswordAlgorithm, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not PasswordAlgorithm

source

pub fn expect_password_algorithm(&self) -> &PasswordAlgorithm

Returns a reference to the PasswordAlgorithm attribute.

§Panics

Panics if the attribute is not an PasswordAlgorithm

source

pub fn is_password_algorithms(&self) -> bool

Returns true if this StunAttribute is PasswordAlgorithms

source

pub fn as_password_algorithms(&self) -> Result<&PasswordAlgorithms, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not PasswordAlgorithms

source

pub fn expect_password_algorithms(&self) -> &PasswordAlgorithms

Returns a reference to the PasswordAlgorithms attribute.

§Panics

Panics if the attribute is not an PasswordAlgorithms

source

pub fn is_realm(&self) -> bool

Returns true if this StunAttribute is Realm

source

pub fn as_realm(&self) -> Result<&Realm, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Realm

source

pub fn expect_realm(&self) -> &Realm

Returns a reference to the Realm attribute.

§Panics

Panics if the attribute is not an Realm

source

pub fn is_software(&self) -> bool

Returns true if this StunAttribute is Software

source

pub fn as_software(&self) -> Result<&Software, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Software

source

pub fn expect_software(&self) -> &Software

Returns a reference to the Software attribute.

§Panics

Panics if the attribute is not an Software

source

pub fn is_unknown_attributes(&self) -> bool

Returns true if this StunAttribute is UnknownAttributes

source

pub fn as_unknown_attributes(&self) -> Result<&UnknownAttributes, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not UnknownAttributes

source

pub fn expect_unknown_attributes(&self) -> &UnknownAttributes

Returns a reference to the UnknownAttributes attribute.

§Panics

Panics if the attribute is not an UnknownAttributes

source

pub fn is_user_hash(&self) -> bool

Returns true if this StunAttribute is UserHash

source

pub fn as_user_hash(&self) -> Result<&UserHash, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not UserHash

source

pub fn expect_user_hash(&self) -> &UserHash

Returns a reference to the UserHash attribute.

§Panics

Panics if the attribute is not an UserHash

source

pub fn is_user_name(&self) -> bool

Returns true if this StunAttribute is UserName

source

pub fn as_user_name(&self) -> Result<&UserName, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not UserName

source

pub fn expect_user_name(&self) -> &UserName

Returns a reference to the UserName attribute.

§Panics

Panics if the attribute is not an UserName

source

pub fn is_xor_mapped_address(&self) -> bool

Returns true if this StunAttribute is XorMappedAddress

source

pub fn as_xor_mapped_address(&self) -> Result<&XorMappedAddress, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not XorMappedAddress

source

pub fn expect_xor_mapped_address(&self) -> &XorMappedAddress

Returns a reference to the XorMappedAddress attribute.

§Panics

Panics if the attribute is not an XorMappedAddress

source

pub fn is_ice_controlled(&self) -> bool

Returns true if this StunAttribute is IceControlled

source

pub fn as_ice_controlled(&self) -> Result<&IceControlled, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not IceControlled

source

pub fn expect_ice_controlled(&self) -> &IceControlled

Returns a reference to the IceControlled attribute.

§Panics

Panics if the attribute is not an IceControlled

source

pub fn is_ice_controlling(&self) -> bool

Returns true if this StunAttribute is IceControlling

source

pub fn as_ice_controlling(&self) -> Result<&IceControlling, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not IceControlling

source

pub fn expect_ice_controlling(&self) -> &IceControlling

Returns a reference to the IceControlling attribute.

§Panics

Panics if the attribute is not an IceControlling

source

pub fn is_priority(&self) -> bool

Returns true if this StunAttribute is Priority

source

pub fn as_priority(&self) -> Result<&Priority, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Priority

source

pub fn expect_priority(&self) -> &Priority

Returns a reference to the Priority attribute.

§Panics

Panics if the attribute is not an Priority

source

pub fn is_use_candidate(&self) -> bool

Returns true if this StunAttribute is UseCandidate

source

pub fn as_use_candidate(&self) -> Result<&UseCandidate, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not UseCandidate

source

pub fn expect_use_candidate(&self) -> &UseCandidate

Returns a reference to the UseCandidate attribute.

§Panics

Panics if the attribute is not an UseCandidate

source

pub fn is_channel_number(&self) -> bool

Returns true if this StunAttribute is ChannelNumber

source

pub fn as_channel_number(&self) -> Result<&ChannelNumber, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not ChannelNumber

source

pub fn expect_channel_number(&self) -> &ChannelNumber

Returns a reference to the ChannelNumber attribute.

§Panics

Panics if the attribute is not an ChannelNumber

source

pub fn is_life_time(&self) -> bool

Returns true if this StunAttribute is LifeTime

source

pub fn as_life_time(&self) -> Result<&LifeTime, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not LifeTime

source

pub fn expect_life_time(&self) -> &LifeTime

Returns a reference to the LifeTime attribute.

§Panics

Panics if the attribute is not an LifeTime

source

pub fn is_xor_peer_address(&self) -> bool

Returns true if this StunAttribute is XorPeerAddress

source

pub fn as_xor_peer_address(&self) -> Result<&XorPeerAddress, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not XorPeerAddress

source

pub fn expect_xor_peer_address(&self) -> &XorPeerAddress

Returns a reference to the XorPeerAddress attribute.

§Panics

Panics if the attribute is not an XorPeerAddress

source

pub fn is_xor_relayed_address(&self) -> bool

Returns true if this StunAttribute is XorRelayedAddress

source

pub fn as_xor_relayed_address(&self) -> Result<&XorRelayedAddress, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not XorRelayedAddress

source

pub fn expect_xor_relayed_address(&self) -> &XorRelayedAddress

Returns a reference to the XorRelayedAddress attribute.

§Panics

Panics if the attribute is not an XorRelayedAddress

source

pub fn is_data(&self) -> bool

Returns true if this StunAttribute is Data

source

pub fn as_data(&self) -> Result<&Data, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Data

source

pub fn expect_data(&self) -> &Data

Returns a reference to the Data attribute.

§Panics

Panics if the attribute is not an Data

source

pub fn is_requested_address_family(&self) -> bool

Returns true if this StunAttribute is RequestedAddressFamily

source

pub fn as_requested_address_family( &self, ) -> Result<&RequestedAddressFamily, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not RequestedAddressFamily

source

pub fn expect_requested_address_family(&self) -> &RequestedAddressFamily

Returns a reference to the RequestedAddressFamily attribute.

§Panics

Panics if the attribute is not an RequestedAddressFamily

source

pub fn is_even_port(&self) -> bool

Returns true if this StunAttribute is EvenPort

source

pub fn as_even_port(&self) -> Result<&EvenPort, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not EvenPort

source

pub fn expect_even_port(&self) -> &EvenPort

Returns a reference to the EvenPort attribute.

§Panics

Panics if the attribute is not an EvenPort

source

pub fn is_dont_fragment(&self) -> bool

Returns true if this StunAttribute is DontFragment

source

pub fn as_dont_fragment(&self) -> Result<&DontFragment, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not DontFragment

source

pub fn expect_dont_fragment(&self) -> &DontFragment

Returns a reference to the DontFragment attribute.

§Panics

Panics if the attribute is not an DontFragment

source

pub fn is_requested_trasport(&self) -> bool

Returns true if this StunAttribute is RequestedTrasport

source

pub fn as_requested_trasport(&self) -> Result<&RequestedTrasport, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not RequestedTrasport

source

pub fn expect_requested_trasport(&self) -> &RequestedTrasport

Returns a reference to the RequestedTrasport attribute.

§Panics

Panics if the attribute is not an RequestedTrasport

source

pub fn is_additional_address_family(&self) -> bool

Returns true if this StunAttribute is AdditionalAddressFamily

source

pub fn as_additional_address_family( &self, ) -> Result<&AdditionalAddressFamily, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not AdditionalAddressFamily

source

pub fn expect_additional_address_family(&self) -> &AdditionalAddressFamily

Returns a reference to the AdditionalAddressFamily attribute.

§Panics

Panics if the attribute is not an AdditionalAddressFamily

source

pub fn is_reservation_token(&self) -> bool

Returns true if this StunAttribute is ReservationToken

source

pub fn as_reservation_token(&self) -> Result<&ReservationToken, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not ReservationToken

source

pub fn expect_reservation_token(&self) -> &ReservationToken

Returns a reference to the ReservationToken attribute.

§Panics

Panics if the attribute is not an ReservationToken

source

pub fn is_address_error_code(&self) -> bool

Returns true if this StunAttribute is AddressErrorCode

source

pub fn as_address_error_code(&self) -> Result<&AddressErrorCode, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not AddressErrorCode

source

pub fn expect_address_error_code(&self) -> &AddressErrorCode

Returns a reference to the AddressErrorCode attribute.

§Panics

Panics if the attribute is not an AddressErrorCode

source

pub fn is_icmp(&self) -> bool

Returns true if this StunAttribute is Icmp

source

pub fn as_icmp(&self) -> Result<&Icmp, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Icmp

source

pub fn expect_icmp(&self) -> &Icmp

Returns a reference to the Icmp attribute.

§Panics

Panics if the attribute is not an Icmp

source

pub fn is_mobility_ticket(&self) -> bool

Returns true if this StunAttribute is MobilityTicket

source

pub fn as_mobility_ticket(&self) -> Result<&MobilityTicket, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not MobilityTicket

source

pub fn expect_mobility_ticket(&self) -> &MobilityTicket

Returns a reference to the MobilityTicket attribute.

§Panics

Panics if the attribute is not an MobilityTicket

source

pub fn is_change_request(&self) -> bool

Returns true if this StunAttribute is ChangeRequest

source

pub fn as_change_request(&self) -> Result<&ChangeRequest, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not ChangeRequest

source

pub fn expect_change_request(&self) -> &ChangeRequest

Returns a reference to the ChangeRequest attribute.

§Panics

Panics if the attribute is not an ChangeRequest

source

pub fn is_other_address(&self) -> bool

Returns true if this StunAttribute is OtherAddress

source

pub fn as_other_address(&self) -> Result<&OtherAddress, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not OtherAddress

source

pub fn expect_other_address(&self) -> &OtherAddress

Returns a reference to the OtherAddress attribute.

§Panics

Panics if the attribute is not an OtherAddress

source

pub fn is_padding(&self) -> bool

Returns true if this StunAttribute is Padding

source

pub fn as_padding(&self) -> Result<&Padding, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not Padding

source

pub fn expect_padding(&self) -> &Padding

Returns a reference to the Padding attribute.

§Panics

Panics if the attribute is not an Padding

source

pub fn is_response_origin(&self) -> bool

Returns true if this StunAttribute is ResponseOrigin

source

pub fn as_response_origin(&self) -> Result<&ResponseOrigin, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not ResponseOrigin

source

pub fn expect_response_origin(&self) -> &ResponseOrigin

Returns a reference to the ResponseOrigin attribute.

§Panics

Panics if the attribute is not an ResponseOrigin

source

pub fn is_response_port(&self) -> bool

Returns true if this StunAttribute is ResponsePort

source

pub fn as_response_port(&self) -> Result<&ResponsePort, StunError>

Returns a reference to the internal attribute value or an error if the type of the attribute is not ResponsePort

source

pub fn expect_response_port(&self) -> &ResponsePort

Returns a reference to the ResponsePort attribute.

§Panics

Panics if the attribute is not an ResponsePort

Trait Implementations§

source§

impl Clone for StunAttribute

source§

fn clone(&self) -> StunAttribute

Returns a copy 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 StunAttribute

source§

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

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

impl From<AdditionalAddressFamily> for StunAttribute

source§

fn from(value: AdditionalAddressFamily) -> Self

Converts to this type from the input type.
source§

impl From<AddressErrorCode> for StunAttribute

source§

fn from(value: AddressErrorCode) -> Self

Converts to this type from the input type.
source§

impl From<AlternateServer> for StunAttribute

source§

fn from(value: AlternateServer) -> Self

Converts to this type from the input type.
source§

impl From<ChangeRequest> for StunAttribute

source§

fn from(value: ChangeRequest) -> Self

Converts to this type from the input type.
source§

impl From<ChannelNumber> for StunAttribute

source§

fn from(value: ChannelNumber) -> Self

Converts to this type from the input type.
source§

impl From<Data> for StunAttribute

source§

fn from(value: Data) -> Self

Converts to this type from the input type.
source§

impl From<DontFragment> for StunAttribute

source§

fn from(value: DontFragment) -> Self

Converts to this type from the input type.
source§

impl From<ErrorCode> for StunAttribute

source§

fn from(value: ErrorCode) -> Self

Converts to this type from the input type.
source§

impl From<EvenPort> for StunAttribute

source§

fn from(value: EvenPort) -> Self

Converts to this type from the input type.
source§

impl From<Fingerprint> for StunAttribute

source§

fn from(value: Fingerprint) -> Self

Converts to this type from the input type.
source§

impl From<IceControlled> for StunAttribute

source§

fn from(value: IceControlled) -> Self

Converts to this type from the input type.
source§

impl From<IceControlling> for StunAttribute

source§

fn from(value: IceControlling) -> Self

Converts to this type from the input type.
source§

impl From<Icmp> for StunAttribute

source§

fn from(value: Icmp) -> Self

Converts to this type from the input type.
source§

impl From<LifeTime> for StunAttribute

source§

fn from(value: LifeTime) -> Self

Converts to this type from the input type.
source§

impl From<MappedAddress> for StunAttribute

source§

fn from(value: MappedAddress) -> Self

Converts to this type from the input type.
source§

impl From<MessageIntegrity> for StunAttribute

source§

fn from(value: MessageIntegrity) -> Self

Converts to this type from the input type.
source§

impl From<MessageIntegritySha256> for StunAttribute

source§

fn from(value: MessageIntegritySha256) -> Self

Converts to this type from the input type.
source§

impl From<MobilityTicket> for StunAttribute

source§

fn from(value: MobilityTicket) -> Self

Converts to this type from the input type.
source§

impl From<Nonce> for StunAttribute

source§

fn from(value: Nonce) -> Self

Converts to this type from the input type.
source§

impl From<OtherAddress> for StunAttribute

source§

fn from(value: OtherAddress) -> Self

Converts to this type from the input type.
source§

impl From<Padding> for StunAttribute

source§

fn from(value: Padding) -> Self

Converts to this type from the input type.
source§

impl From<PasswordAlgorithm> for StunAttribute

source§

fn from(value: PasswordAlgorithm) -> Self

Converts to this type from the input type.
source§

impl From<PasswordAlgorithms> for StunAttribute

source§

fn from(value: PasswordAlgorithms) -> Self

Converts to this type from the input type.
source§

impl From<Priority> for StunAttribute

source§

fn from(value: Priority) -> Self

Converts to this type from the input type.
source§

impl From<Realm> for StunAttribute

source§

fn from(value: Realm) -> Self

Converts to this type from the input type.
source§

impl From<RequestedAddressFamily> for StunAttribute

source§

fn from(value: RequestedAddressFamily) -> Self

Converts to this type from the input type.
source§

impl From<RequestedTrasport> for StunAttribute

source§

fn from(value: RequestedTrasport) -> Self

Converts to this type from the input type.
source§

impl From<ReservationToken> for StunAttribute

source§

fn from(value: ReservationToken) -> Self

Converts to this type from the input type.
source§

impl From<ResponseOrigin> for StunAttribute

source§

fn from(value: ResponseOrigin) -> Self

Converts to this type from the input type.
source§

impl From<ResponsePort> for StunAttribute

source§

fn from(value: ResponsePort) -> Self

Converts to this type from the input type.
source§

impl From<Software> for StunAttribute

source§

fn from(value: Software) -> Self

Converts to this type from the input type.
source§

impl From<Unknown> for StunAttribute

source§

fn from(value: Unknown) -> Self

Converts to this type from the input type.
source§

impl From<UnknownAttributes> for StunAttribute

source§

fn from(value: UnknownAttributes) -> Self

Converts to this type from the input type.
source§

impl From<UseCandidate> for StunAttribute

source§

fn from(value: UseCandidate) -> Self

Converts to this type from the input type.
source§

impl From<UserHash> for StunAttribute

source§

fn from(value: UserHash) -> Self

Converts to this type from the input type.
source§

impl From<UserName> for StunAttribute

source§

fn from(value: UserName) -> Self

Converts to this type from the input type.
source§

impl From<XorMappedAddress> for StunAttribute

source§

fn from(value: XorMappedAddress) -> Self

Converts to this type from the input type.
source§

impl From<XorPeerAddress> for StunAttribute

source§

fn from(value: XorPeerAddress) -> Self

Converts to this type from the input type.
source§

impl From<XorRelayedAddress> for StunAttribute

source§

fn from(value: XorRelayedAddress) -> Self

Converts to this type from the input type.

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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