[][src]Trait lnpbp::lnp::session::node_addr::ToRemoteNodeAddr

pub trait ToRemoteNodeAddr {
    fn to_remote_node_addr(&self, default_port: u16) -> Option<RemoteNodeAddr>;
}

Trait allowing generic function arguments for application-level implementations knowing default protocol port

Required methods

fn to_remote_node_addr(&self, default_port: u16) -> Option<RemoteNodeAddr>

Constructs RemoteNodeAddr from an internal data with a default port put in place when the port details were not given is such structures as PartialNodeAddr

Returns

  • None, if the underlying type variant can't be represented as a complete node address (for instance, for unencrypted local socket) Corresponds to situations when TryInto<RemoteNodeAddr> returns [ConversionError::UnsupportedType] or when string conversion fails with AddrError.
  • Some(RemoteNodeAddr) otherwise
Loading content...

Implementations on Foreign Types

impl ToRemoteNodeAddr for String[src]

impl<'_> ToRemoteNodeAddr for &'_ str[src]

impl<T, '_> ToRemoteNodeAddr for &'_ T where
    T: ToRemoteNodeAddr
[src]

Loading content...

Implementors

impl ToRemoteNodeAddr for PartialNodeAddr[src]

impl ToRemoteNodeAddr for RemoteNodeAddr[src]

Loading content...