#[non_exhaustive]pub enum NetworkError {
Connection {
code: ErrorCode,
message: String,
},
Relay {
code: ErrorCode,
message: String,
},
Request {
code: ErrorCode,
message: String,
},
Response {
code: ErrorCode,
message: String,
},
Timeout {
code: ErrorCode,
message: String,
},
Attestation {
code: ErrorCode,
message: String,
},
Subscribe {
code: ErrorCode,
message: String,
},
Publish {
code: ErrorCode,
message: String,
},
Warden {
code: ErrorCode,
message: String,
},
}Expand description
Network operation errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl NetworkError
impl NetworkError
pub fn connection(message: impl Into<String>) -> Self
pub fn relay(message: impl Into<String>) -> Self
pub fn request(message: impl Into<String>) -> Self
pub fn response(message: impl Into<String>) -> Self
pub fn timeout(message: impl Into<String>) -> Self
pub fn attestation(message: impl Into<String>) -> Self
pub fn subscribe(message: impl Into<String>) -> Self
pub fn publish(message: impl Into<String>) -> Self
pub fn warden(message: impl Into<String>) -> Self
pub fn code(&self) -> ErrorCode
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 KeepError
impl From<NetworkError> for KeepError
Source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for NetworkError
impl Freeze for NetworkError
impl Move 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