Struct stun_codec::rfc5766::attributes::XorPeerAddress
source · pub struct XorPeerAddress(/* private fields */);
Expand description
XOR-PEER-ADDRESS
attribute.
See RFC 5766 – 14.3. XOR-PEER-ADDRESS about this attribute.
Implementations§
source§impl XorPeerAddress
impl XorPeerAddress
sourcepub fn new(addr: SocketAddr) -> Self
pub fn new(addr: SocketAddr) -> Self
Makes a new XorPeerAddress
instance.
sourcepub fn address(&self) -> SocketAddr
pub fn address(&self) -> SocketAddr
Returns the address specified by the attribute.
Trait Implementations§
source§impl Attribute for XorPeerAddress
impl Attribute for XorPeerAddress
§type Decoder = XorPeerAddressDecoder
type Decoder = XorPeerAddressDecoder
The decoder of the value part of the attribute.
§type Encoder = XorPeerAddressEncoder
type Encoder = XorPeerAddressEncoder
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 XorPeerAddress
impl Clone for XorPeerAddress
source§fn clone(&self) -> XorPeerAddress
fn clone(&self) -> XorPeerAddress
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 XorPeerAddress
impl Debug for XorPeerAddress
source§impl From<XorPeerAddress> for Attribute
impl From<XorPeerAddress> for Attribute
source§fn from(f: XorPeerAddress) -> Self
fn from(f: XorPeerAddress) -> Self
Converts to this type from the input type.
source§impl Hash for XorPeerAddress
impl Hash for XorPeerAddress
source§impl PartialEq for XorPeerAddress
impl PartialEq for XorPeerAddress
source§fn eq(&self, other: &XorPeerAddress) -> bool
fn eq(&self, other: &XorPeerAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryAsRef<XorPeerAddress> for Attribute
impl TryAsRef<XorPeerAddress> for Attribute
source§fn try_as_ref(&self) -> Option<&XorPeerAddress>
fn try_as_ref(&self) -> Option<&XorPeerAddress>
impl Eq for XorPeerAddress
impl StructuralPartialEq for XorPeerAddress
Auto Trait Implementations§
impl Freeze for XorPeerAddress
impl RefUnwindSafe for XorPeerAddress
impl Send for XorPeerAddress
impl Sync for XorPeerAddress
impl Unpin for XorPeerAddress
impl UnwindSafe for XorPeerAddress
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