Struct stun_codec::rfc5766::attributes::XorRelayAddress
source · pub struct XorRelayAddress(/* private fields */);
Expand description
XOR-RELAY-ADDRESS
attribute.
See RFC 5766 – 14.5. XOR-RELAY-ADDRESS about this attribute.
Implementations§
source§impl XorRelayAddress
impl XorRelayAddress
sourcepub fn new(addr: SocketAddr) -> Self
pub fn new(addr: SocketAddr) -> Self
Makes a new XorRelayAddress
instance.
sourcepub fn address(&self) -> SocketAddr
pub fn address(&self) -> SocketAddr
Returns the address specified by the attribute.
Trait Implementations§
source§impl Attribute for XorRelayAddress
impl Attribute for XorRelayAddress
§type Decoder = XorRelayAddressDecoder
type Decoder = XorRelayAddressDecoder
The decoder of the value part of the attribute.
§type Encoder = XorRelayAddressEncoder
type Encoder = XorRelayAddressEncoder
The encoder of the value part of the attribute.
source§fn get_type(&self) -> AttributeType
fn get_type(&self) -> AttributeType
Returns the type of the attribute.
source§impl Clone for XorRelayAddress
impl Clone for XorRelayAddress
source§fn clone(&self) -> XorRelayAddress
fn clone(&self) -> XorRelayAddress
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for XorRelayAddress
impl Debug for XorRelayAddress
source§impl From<XorRelayAddress> for Attribute
impl From<XorRelayAddress> for Attribute
source§fn from(f: XorRelayAddress) -> Self
fn from(f: XorRelayAddress) -> Self
Converts to this type from the input type.
source§impl Hash for XorRelayAddress
impl Hash for XorRelayAddress
source§impl PartialEq for XorRelayAddress
impl PartialEq for XorRelayAddress
source§fn eq(&self, other: &XorRelayAddress) -> bool
fn eq(&self, other: &XorRelayAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryAsRef<XorRelayAddress> for Attribute
impl TryAsRef<XorRelayAddress> for Attribute
source§fn try_as_ref(&self) -> Option<&XorRelayAddress>
fn try_as_ref(&self) -> Option<&XorRelayAddress>
impl Eq for XorRelayAddress
impl StructuralPartialEq for XorRelayAddress
Auto Trait Implementations§
impl Freeze for XorRelayAddress
impl RefUnwindSafe for XorRelayAddress
impl Send for XorRelayAddress
impl Sync for XorRelayAddress
impl Unpin for XorRelayAddress
impl UnwindSafe for XorRelayAddress
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more