pub enum Error {
Show 16 variants
Protocol(String),
OperationFailed {
code: Option<String>,
message: String,
},
Unsatisfiable {
code: Option<String>,
message: String,
},
CircuitExtensionFailed {
message: String,
circuit: Option<Box<CircuitEvent>>,
},
DescriptorUnavailable(String),
Timeout(String),
InvalidRequest {
code: Option<String>,
message: String,
},
InvalidArguments {
code: Option<String>,
message: String,
arguments: Vec<String>,
},
Socket(String),
SocketClosed,
DownloadFailed {
url: String,
message: String,
},
DownloadTimeout {
url: String,
seconds: f64,
},
Authentication(AuthenticationError),
InvalidInput(String),
Parse(String),
Io(Error),
}Variants§
Protocol(String)
OperationFailed
Unsatisfiable
CircuitExtensionFailed
Timeout(String)
InvalidRequest
InvalidArguments
Socket(String)
SocketClosed
DownloadFailed
DownloadTimeout
Authentication(AuthenticationError)
InvalidInput(String)
Parse(String)
Io(Error)
Implementations§
Source§impl Error
impl Error
pub fn protocol(message: impl Into<String>) -> Self
pub fn parse(message: impl Into<String>) -> Self
pub fn invalid_input(message: impl Into<String>) -> Self
pub fn operation_failed(code: &str, message: impl Into<String>) -> Self
pub fn unsatisfiable(message: impl Into<String>) -> Self
pub fn invalid_request(code: &str, message: impl Into<String>) -> Self
pub fn invalid_arguments( code: &str, message: impl Into<String>, arguments: Vec<String>, ) -> Self
pub fn is_socket_closed(&self) -> bool
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<AuthenticationError> for Error
impl From<AuthenticationError> for Error
Source§fn from(source: AuthenticationError) -> Self
fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.
Source§impl From<DecryptionFailure> for Error
impl From<DecryptionFailure> for Error
Source§fn from(failure: DecryptionFailure) -> Self
fn from(failure: DecryptionFailure) -> Self
Converts to this type from the input type.
Source§impl From<SchemaMismatch> for Error
impl From<SchemaMismatch> for Error
Source§fn from(mismatch: SchemaMismatch) -> Self
fn from(mismatch: SchemaMismatch) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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