pub enum NetworkError {
Show 16 variants
SendFailed {
peer_id: Option<Uuid>,
reason: String,
},
ReceiveFailed {
reason: String,
},
NoMessage,
BroadcastFailed {
reason: String,
},
ConnectionFailed(String),
NotImplemented,
SerializationFailed {
error: String,
},
DeserializationFailed {
error: String,
},
OperationTimeout {
operation: String,
timeout_ms: u64,
},
RetryLimitExceeded {
attempts: u32,
last_error: String,
},
CircuitBreakerOpen {
reason: String,
},
PeerUnreachable {
peer_id: String,
},
NetworkPartition {
details: String,
},
ValidationFailed {
reason: String,
},
RateLimitExceeded {
limit: u32,
window_ms: u64,
},
SubscriptionFailed {
reason: String,
},
}Expand description
Network operation errors
Variants§
SendFailed
Failed to send a message to the destination
ReceiveFailed
Failed to receive a message from the source
NoMessage
No message is available to receive
BroadcastFailed
Broadcast operation failed
ConnectionFailed(String)
Failed to establish a connection
NotImplemented
Operation is unsupported by the current handler
SerializationFailed
Serialization failed while preparing a network payload
DeserializationFailed
Deserialization failed while decoding a payload
OperationTimeout
Operation timed out
Fields
RetryLimitExceeded
Request retry limit exceeded
Fields
CircuitBreakerOpen
Circuit breaker is open
PeerUnreachable
Peer unreachable
NetworkPartition
Network partition detected
ValidationFailed
Message validation failed
RateLimitExceeded
Rate limit exceeded
SubscriptionFailed
Subscription to peer events failed
Trait Implementations§
Source§impl Debug for NetworkError
impl Debug for NetworkError
Source§impl<'de> Deserialize<'de> for NetworkError
impl<'de> Deserialize<'de> for NetworkError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 AuraError
impl From<NetworkError> for AuraError
Source§fn from(err: NetworkError) -> Self
fn from(err: 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 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
Mutably borrows from an owned value. Read more