#[non_exhaustive]pub enum NetworkError {
Show 16 variants
InvalidConfig(String),
Identity(String),
InvalidTicket(String),
NetworkMismatch,
SchemaMismatch,
UnsupportedProtocolVersion,
HandshakeRejected,
PeerNotConnected(EndpointId),
MessageTooLarge,
Timeout,
Serialization(String),
Transport(String),
MessageRejected(String),
UnknownStreamProtocol(String),
StreamAcceptorTaken(String),
ShuttingDown,
}Expand description
All errors that can be returned by the public API of this library.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidConfig(String)
The provided crate::NetworkConfig is invalid.
Identity(String)
Loading or persisting the peer identity failed.
InvalidTicket(String)
A peer ticket could not be parsed or validated.
NetworkMismatch
The remote peer belongs to a different network.
SchemaMismatch
The remote peer uses an incompatible message schema.
UnsupportedProtocolVersion
The remote peer speaks an unsupported protocol version.
HandshakeRejected
The remote peer rejected the handshake as malformed.
PeerNotConnected(EndpointId)
No active connection to the given peer exists.
MessageTooLarge
A message exceeds the configured maximum size.
Timeout
The operation did not complete within the configured timeout.
Serialization(String)
Encoding or decoding a wire payload failed.
Transport(String)
The underlying Iroh transport reported an error.
MessageRejected(String)
The remote peer rejected a message.
UnknownStreamProtocol(String)
The given ALPN was not declared as a stream protocol in the configuration.
StreamAcceptorTaken(String)
The incoming-stream acceptor for this protocol was already taken.
ShuttingDown
The engine is shutting down and no longer accepts operations.
Trait Implementations§
Source§impl Debug for NetworkError
impl Debug for NetworkError
Source§impl Display for NetworkError
impl Display for NetworkError
Source§impl Error for NetworkError
impl Error for NetworkError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for NetworkError
impl RefUnwindSafe for NetworkError
impl Send for NetworkError
impl Sync for NetworkError
impl Unpin for NetworkError
impl UnsafeUnpin for NetworkError
impl UnwindSafe for NetworkError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more