Trait p2p::SocketAddrExt [−][src]
pub trait SocketAddrExt { fn expand_local_unspecified(&self) -> Result<Vec<SocketAddr>>; fn unspecified_to_localhost(&self) -> SocketAddr; }
Some helpful additional methods for SocketAddr
.
Required Methods
fn expand_local_unspecified(&self) -> Result<Vec<SocketAddr>>
If the IP address is an unspecified address (eg. 0.0.0.0
), then it is expanded into a
vector with a seperate IP address for each network interface.
fn unspecified_to_localhost(&self) -> SocketAddr
If this is the unspecified address then map it to the localhost address.
Implementations on Foreign Types
impl SocketAddrExt for SocketAddr
[src]
impl SocketAddrExt for SocketAddr
fn expand_local_unspecified(&self) -> Result<Vec<SocketAddr>>
[src]
fn expand_local_unspecified(&self) -> Result<Vec<SocketAddr>>
fn unspecified_to_localhost(&self) -> SocketAddr
[src]
fn unspecified_to_localhost(&self) -> SocketAddr