Struct stun_codec::rfc5766::attributes::XorPeerAddress [−][src]
pub struct XorPeerAddress(_);
XOR-PEER-ADDRESS
attribute.
See RFC 5766 -- 14.3. XOR-PEER-ADDRESS about this attribute.
Methods
impl XorPeerAddress
[src]
impl XorPeerAddress
pub const CODEPOINT: u16
CODEPOINT: u16 = 18
The codepoint of the type of the attribute.
pub fn new(addr: SocketAddr) -> Self
[src]
pub fn new(addr: SocketAddr) -> Self
Makes a new XorPeerAddress
instance.
pub fn address(&self) -> SocketAddr
[src]
pub fn address(&self) -> SocketAddr
Returns the address specified by the attribute.
Trait Implementations
impl Debug for XorPeerAddress
[src]
impl Debug for XorPeerAddress
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for XorPeerAddress
[src]
impl Clone for XorPeerAddress
fn clone(&self) -> XorPeerAddress
[src]
fn clone(&self) -> XorPeerAddress
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for XorPeerAddress
[src]
impl PartialEq for XorPeerAddress
fn eq(&self, other: &XorPeerAddress) -> bool
[src]
fn eq(&self, other: &XorPeerAddress) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &XorPeerAddress) -> bool
[src]
fn ne(&self, other: &XorPeerAddress) -> bool
This method tests for !=
.
impl Eq for XorPeerAddress
[src]
impl Eq for XorPeerAddress
impl Hash for XorPeerAddress
[src]
impl Hash for XorPeerAddress
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Attribute for XorPeerAddress
[src]
impl Attribute for XorPeerAddress
type Decoder = XorPeerAddressDecoder
The decoder of the value part of the attribute.
type Encoder = XorPeerAddressEncoder
The encoder of the value part of the attribute.
fn get_type(&self) -> AttributeType
[src]
fn get_type(&self) -> AttributeType
Returns the type of the attribute.
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn before_encode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called before encoding the attribute. Read more
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
[src]
fn after_decode<A: Attribute>(&mut self, message: &Message<A>) -> Result<()>
This method is called after decoding the attribute and before being appended to the given message. Read more
impl From<XorPeerAddress> for Attribute
[src]
impl From<XorPeerAddress> for Attribute
fn from(f: XorPeerAddress) -> Self
[src]
fn from(f: XorPeerAddress) -> Self
Performs the conversion.
impl TryAsRef<XorPeerAddress> for Attribute
[src]
impl TryAsRef<XorPeerAddress> for Attribute
fn try_as_ref(&self) -> Option<&XorPeerAddress>
[src]
fn try_as_ref(&self) -> Option<&XorPeerAddress>
Attempts to convert self
to a reference to T
. Read more
Auto Trait Implementations
impl Send for XorPeerAddress
impl Send for XorPeerAddress
impl Sync for XorPeerAddress
impl Sync for XorPeerAddress