[−][src]Trait async_coap::SocketAddrExt
Extension trait for SocketAddr
types that allows the local endpoint get the information
it needs.
Required methods
fn is_multicast(&self) -> bool
Determines if the address in this SocketAddr
is a multicast/broadcast address or not.
fn port(&self) -> u16
Returns the port number for this socket.
A value of zero indicates no specific value.
fn addr_to_string(&self) -> String
Renders the address portion to a string.
Provided methods
fn conforming_to(&self, local: Self) -> Option<Self>
Returns a version of this socket address that conforms to the address type of local
,
or None
if such a conversion is not possible.
This method is useful in mixed ipv6/ipv4 environments.
fn as_uri_buf(&self, scheme: &str) -> UriBuf
Creates a URI from this SocketAddr
using the given scheme.