pub struct Error<T: Error + Send + Sync + 'static>(/* private fields */);
Expand description
The error type that can be returned by the Client.
The type T
is the error type of the transport layer. That is, it is <Transport as MakeRequest>::Error
for Client<Transport>
.
Implementations§
Source§impl<T: Error + Send + Sync + 'static> Error<T>
impl<T: Error + Send + Sync + 'static> Error<T>
Sourcepub fn as_transport_error(&self) -> Option<&T>
pub fn as_transport_error(&self) -> Option<&T>
Try to turn this error into an underlying transport error, by reference.
will return None
if the error was not caused by the transport layer, but was instead a protocol level error.
Sourcepub fn into_transport_error(self) -> Option<T>
pub fn into_transport_error(self) -> Option<T>
Try to turn this error into an underlying transport error, consuming the error.
will return None
if the error was not caused by the transport layer, but was instead a protocol level error.
Trait Implementations§
Source§impl<T: Error + Send + Sync + 'static> Error for Error<T>
impl<T: Error + Send + Sync + 'static> Error for Error<T>
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()
Auto Trait Implementations§
impl<T> Freeze for Error<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Error<T>
impl<T> Send for Error<T>
impl<T> Sync for Error<T>
impl<T> Unpin for Error<T>where
T: Unpin,
impl<T> !UnwindSafe for Error<T>
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