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)
Unknown protocol name in URL scheme ({0})
UnknownUrlScheme(String)
The provided URL scheme {0} was not recognized
MalformedUrl(ParseError)
Can’t parse URL from the given string
MalformedIpAddr(AddrParseError)
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)
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)
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)
The provided protocol can’t be used for {0}
NoOnionSupport
Onion addresses are not supported by this socket type
Trait Implementations
sourceimpl Error for AddrError
impl Error for AddrError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<AddrParseError> for AddrError
impl From<AddrParseError> for AddrError
sourcefn from(v: AddrParseError) -> Self
fn from(v: AddrParseError) -> Self
Converts to this type from the input type.
sourceimpl From<AddrParseError> for AddrError
impl From<AddrParseError> for AddrError
sourcefn from(v: AddrParseError) -> Self
fn from(v: AddrParseError) -> Self
Converts to this type from the input type.
sourceimpl From<NoOnionSupportError> for AddrError
impl From<NoOnionSupportError> for AddrError
sourcefn from(v: NoOnionSupportError) -> Self
fn from(v: NoOnionSupportError) -> Self
Converts to this type from the input type.
sourceimpl From<ParseError> for AddrError
impl From<ParseError> for AddrError
sourcefn from(v: ParseError) -> Self
fn from(v: ParseError) -> Self
Converts to this type from the input type.
impl Eq for AddrError
impl StructuralEq for AddrError
impl StructuralPartialEq for AddrError
Auto Trait Implementations
impl RefUnwindSafe for AddrError
impl Send for AddrError
impl Sync for AddrError
impl Unpin for AddrError
impl UnwindSafe for AddrError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more