pub enum Error<T = Response> {
Protocol(ProtocolError),
HttpError(T),
}
Variants§
Protocol(ProtocolError)
HttpError(T)
Implementations§
Source§impl Error<InMemoryResponse>
impl Error<InMemoryResponse>
pub fn status(&self) -> Option<StatusCode>
Source§impl Error
impl Error
Sourcepub fn status(&self) -> Option<StatusCode>
pub fn status(&self) -> Option<StatusCode>
Get the error status code.
pub async fn into_content(self) -> InMemoryError
Trait Implementations§
Source§impl From<Error<Response<InMemoryBody>>> for Error
impl From<Error<Response<InMemoryBody>>> for Error
Source§fn from(value: InMemoryError) -> Self
fn from(value: InMemoryError) -> Self
Converts to this type from the input type.
Source§impl<T> From<FromUtf8Error> for Error<T>
impl<T> From<FromUtf8Error> for Error<T>
Source§fn from(value: FromUtf8Error) -> Self
fn from(value: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl<T> From<ProtocolError> for Error<T>
impl<T> From<ProtocolError> for Error<T>
Source§fn from(value: ProtocolError) -> Self
fn from(value: ProtocolError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for Error<T>where
T: Freeze,
impl<T = Response<Body>> !RefUnwindSafe for Error<T>
impl<T> Send for Error<T>where
T: Send,
impl<T> Sync for Error<T>where
T: Sync,
impl<T> Unpin for Error<T>where
T: Unpin,
impl<T = Response<Body>> !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