Enum internet2::AddrError[][src]

pub enum AddrError {
Show 16 variants UnknownProtocol(String), UnknownUrlScheme(String), MalformedUrl(ParseError), MalformedIpAddr(AddrParseError), MalformedInetAddr(AddrParseError), InvalidPubkey, HostRequired, PortRequired, UnexpectedAuthority, UnexpectedHost, UnexpectedPort, InvalidZmqType(String), ZmqTypeRequired, ZmqContextRequired, Unsupported(&'static str), NoOnionSupport,
}
Expand description

Error extracting transport-level address types (FramingProtocol, LocalSocketAddr, RemoteSocketAddr) and session-level node types (NodeAddr, LocalNode, RemoteNodeAddr) from string, URLs and other data types

Variants

UnknownProtocol(String)

Tuple Fields

0: String

Unknown protocol name in URL scheme ({0})

UnknownUrlScheme(String)

Tuple Fields

0: String

The provided URL scheme {0} was not recognized

MalformedUrl(ParseError)

Tuple Fields

Can’t parse URL from the given string

MalformedIpAddr(AddrParseError)

Tuple Fields

Malformed IP address. NB: DNS addressing is not used since it is considered insecure in terms of censorship resistance, so you need to provide it in a form of either IPv4 or IPv6 address. If you need Tor support use other protocol type supporting Tor.

MalformedInetAddr(AddrParseError)

Tuple Fields

Malformed IP or Onion address. NB: DNS addressing is not used since it is considered insecure in terms of censorship resistance, so you need to provide it in a form of either IPv4, IPv6 address or Tor v2, v3 address (w/o .onion suffix)

InvalidPubkey

Invalid public key data representing node id

HostRequired

No host information found in URL, while it is required for the given scheme

PortRequired

No port information found in URL, while it is required for the given scheme

UnexpectedAuthority

Unexpected URL authority data (part before ‘@’ in URL) which must be omitted

UnexpectedHost

Used scheme must not contain information about host

UnexpectedPort

Used scheme must not contain information about port

InvalidZmqType(String)

Tuple Fields

0: String

Unsupported ZMQ API type ({0}). List of supported APIs:

  • rpc
  • p2p
  • sub
  • esb

ZmqTypeRequired

No ZMQ API type information for URL scheme that requires one.

ZmqContextRequired

Inproc ZMQ type requires ZMQ context which exsits only in runtime and can’t be persisted. This, it can’t be provided through this type.

Unsupported(&'static str)

Tuple Fields

0: &'static str

The provided protocol can’t be used for {0}

NoOnionSupport

Onion addresses are not supported by this socket type

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.