pub fn new<Addr>(addr: Addr) -> Result<Self, multiaddr::Error>
    where
        Addr: ToMultiaddr,
    {
        addr.to_multiaddr().map(Address)
    }
/// create a new address from any given [`ToMultiaddr`] implementors
///
/// # Examples
///
/// TODO: simple example with SockAddr from standard lib
/// TODO: simple example with a multiaddr object and a string
///
/// TODO: [`ToMultiaddr`]
create a new address from any given [`ToMultiaddr`] implementors
create a new address from any given [ ` ToMultiaddr ` ] implementors
pub fn new<Addr>(addr: Addr) -> Result<Self, multiaddr::Error>
    where
        Addr: ToMultiaddr,
    {
        addr.to_multiaddr().map(Address)
    }
pub fn new < Addr > ( addr : Addr ) -> Result < Self , multiaddr :: Error > where Addr : ToMultiaddr , { addr . to_multiaddr ( ) . map ( Address ) }
create a new address from any given [`ToMultiaddr`] implementors
create a new address from any given [ ` ToMultiaddr ` ] implementors
addr
Addr
examples
simple example with SockAddr from standard lib
TODO: simple example with a multiaddr object and a string

[`ToMultiaddr`]
simple example with SockAddr from standard lib TODO : simple example with a multiaddr object and a string [ ` ToMultiaddr ` ]