pub enum NetworkError {
ConnectionFailed {
endpoint: String,
reason: String,
},
ConnectionTimeout {
endpoint: String,
duration: Duration,
},
NetworkPartition {
details: String,
},
SendFailed {
recipient: String,
reason: String,
},
ReceiveFailed {
sender: String,
reason: String,
},
ProtocolError {
protocol: String,
details: String,
},
PeerDisconnected {
peer_id: String,
},
InvalidAddress {
address: String,
},
}Expand description
Network and communication errors
Variants§
ConnectionFailed
Connection failed
ConnectionTimeout
Connection timeout
NetworkPartition
Network partition detected
SendFailed
Message send failed
ReceiveFailed
Message receive failed
ProtocolError
Protocol error
PeerDisconnected
Peer disconnected
InvalidAddress
Invalid network address
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<NetworkError> for Error
impl From<NetworkError> for Error
Source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NetworkError
impl RefUnwindSafe for NetworkError
impl Send for NetworkError
impl Sync for NetworkError
impl Unpin 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
Mutably borrows from an owned value. Read more