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

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

Required Methods

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 AddrError or when string conversion fails with AddrError.
  • Some(RemoteNodeAddr) otherwise

Implementations on Foreign Types

Implementors