[][src]Trait internet2::session::node_addr::ToRemoteNodeAddr

pub trait ToRemoteNodeAddr {
    pub 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

pub fn to_remote_node_addr(&self, default_port: u16) -> Option<RemoteNodeAddr>[src]

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...