pub struct Error { /* private fields */ }Expand description
A concrete error type for HTTP operations.
Note that this type doesn’t implement HttpError directly, but also provide status method
to get the associated status code.
Implementations§
Source§impl Error
impl Error
Sourcepub fn msg(msg: impl Display + Send + Sync + Debug + 'static) -> Self
pub fn msg(msg: impl Display + Send + Sync + Debug + 'static) -> Self
Create a new error with a custom message.
Sourcepub fn into_inner(self) -> Report
pub fn into_inner(self) -> Report
Consume the error and return the inner eyre::Report.
Sourcepub fn into_boxed_http_error(self) -> BoxHttpError
pub fn into_boxed_http_error(self) -> BoxHttpError
Convert this error into a boxed HTTP error trait object.
Sourcepub fn set_status(self, status: StatusCode) -> Self
pub fn set_status(self, status: StatusCode) -> Self
Set the HTTP status code for this error.
Trait Implementations§
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