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) -> XorPeerAddress
pub fn new(addr: SocketAddr) -> XorPeerAddress
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
Source§type Decoder = XorPeerAddressDecoder
type Decoder = XorPeerAddressDecoder
The decoder of the value part of the attribute.
Source§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 duplicate 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§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