Struct stun_codec::rfc5389::attributes::XorMappedAddress [−][src]
pub struct XorMappedAddress(_);
XOR-MAPPED-ADDRESS
attribute.
See RFC 5389 -- 15.2. XOR-MAPPED-ADDRESS about this attribute.
Methods
impl XorMappedAddress
[src]
impl XorMappedAddress
pub const CODEPOINT: u16
CODEPOINT: u16 = 32
The codepoint of the type of the attribute.
pub fn new(addr: SocketAddr) -> Self
[src]
pub fn new(addr: SocketAddr) -> Self
Makes a new XorMappedAddress
instance.
pub fn address(&self) -> SocketAddr
[src]
pub fn address(&self) -> SocketAddr
Returns the address of this instance.
Trait Implementations
impl Debug for XorMappedAddress
[src]
impl Debug for XorMappedAddress
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 XorMappedAddress
[src]
impl Clone for XorMappedAddress
fn clone(&self) -> XorMappedAddress
[src]
fn clone(&self) -> XorMappedAddress
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 XorMappedAddress
[src]
impl PartialEq for XorMappedAddress
fn eq(&self, other: &XorMappedAddress) -> bool
[src]
fn eq(&self, other: &XorMappedAddress) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &XorMappedAddress) -> bool
[src]
fn ne(&self, other: &XorMappedAddress) -> bool
This method tests for !=
.
impl Eq for XorMappedAddress
[src]
impl Eq for XorMappedAddress
impl Hash for XorMappedAddress
[src]
impl Hash for XorMappedAddress
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 XorMappedAddress
[src]
impl Attribute for XorMappedAddress
type Decoder = XorMappedAddressDecoder
The decoder of the value part of the attribute.
type Encoder = XorMappedAddressEncoder
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<XorMappedAddress> for Attribute
[src]
impl From<XorMappedAddress> for Attribute
fn from(f: XorMappedAddress) -> Self
[src]
fn from(f: XorMappedAddress) -> Self
Performs the conversion.
impl TryAsRef<XorMappedAddress> for Attribute
[src]
impl TryAsRef<XorMappedAddress> for Attribute
fn try_as_ref(&self) -> Option<&XorMappedAddress>
[src]
fn try_as_ref(&self) -> Option<&XorMappedAddress>
Attempts to convert self
to a reference to T
. Read more
Auto Trait Implementations
impl Send for XorMappedAddress
impl Send for XorMappedAddress
impl Sync for XorMappedAddress
impl Sync for XorMappedAddress