pub enum Error<B>where
B: StdError,{
Http(Error),
HttpStatus(StatusCode, Vec<u8>),
Conversion(B),
}
Expand description
An error type that any endpoint related error can be converted into.
Please note that this error type necessarily looses some information over dealing with the actual endpoint error type.
Variants§
Http(Error)
An HTTP related error.
HttpStatus(StatusCode, Vec<u8>)
We encountered an HTTP that either represents a failure or is not supported.
Conversion(B)
Some kind of conversion error was encountered.
Trait Implementations§
Source§impl<B> Error for Error<B>where
B: StdError,
impl<B> Error for Error<B>where
B: StdError,
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()
Auto Trait Implementations§
impl<B> Freeze for Error<B>where
B: Freeze,
impl<B> RefUnwindSafe for Error<B>where
B: RefUnwindSafe,
impl<B> Send for Error<B>where
B: Send,
impl<B> Sync for Error<B>where
B: Sync,
impl<B> Unpin for Error<B>where
B: Unpin,
impl<B> UnwindSafe for Error<B>where
B: UnwindSafe,
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