[−][src]Trait parity_multiaddr::ToMultiaddr
A trait for objects which can be converted to a Multiaddr.
This trait is implemented by default for
-
SocketAddr
,SocketAddrV4
andSocketAddrV6
, assuming that the the given port is a tcp port. -
Ipv4Addr
,Ipv6Addr
-
String
and&str
, requiring the default string format for a Multiaddr.
Required methods
fn to_multiaddr(&self) -> Result<Multiaddr>
Converts this object to a Multiaddr
Errors
Any errors encountered during parsing will be returned
as an Err
.