#[repr(C)]pub struct Error {
pub code: Code,
pub subject: Subject,
pub state: State,
pub location: Location,
}Expand description
mfio’s error type.
This type consists of 4 distinct pieces:
code, representing equivalent HTTP status code, which may not be descriptive, and often falls back toINTERNAL_ERROR, representing HTTP code 500.subject, represents what errored out.state, represents what kind of error state was reached.location, where in the program the error occured.
Fields§
§code: Code§subject: Subject§state: State§location: LocationTrait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.1.30.0 · 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()
Source§impl ErrorSpecify for Error
impl ErrorSpecify for Error
Source§impl From<Error> for StatusCode
Available on crate feature http only.
impl From<Error> for StatusCode
Available on crate feature
http only.Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl IntError for Error
impl IntError for Error
fn into_int_err(self) -> NonZeroI32
fn from_int_err(err: NonZeroI32) -> Self
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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