pub struct Error { /* private fields */ }
Expand description
A universal error type which contains a source and a kind.
An error is either associated with the client or the server.
Implementations§
Source§impl Error
impl Error
Sourcepub fn status_code(&self) -> StatusCode
pub fn status_code(&self) -> StatusCode
Returns the StatusCode
corresponding to the ErrorKind
.
Sourcepub fn from_client_io(error: Error) -> Self
pub fn from_client_io(error: Error) -> Self
Returns a new error from an io::Error originating from the client.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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<DeserializeError> for Error
impl From<DeserializeError> for Error
Source§fn from(e: DeserializeError) -> Self
fn from(e: DeserializeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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