pub struct Status {
pub code: StatusCode,
pub err: String,
}
Expand description
Status encapsulates a StatusCode
and an error message. It can be displayed, and also
implements Error
. io::Error can be converted into Status.
Fields§
§code: StatusCode
§err: String
Implementations§
Trait Implementations§
source§impl Error for Status
impl Error for Status
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
source§impl<T> From<PoisonError<T>> for Status
impl<T> From<PoisonError<T>> for Status
source§fn from(_: PoisonError<T>) -> Status
fn from(_: PoisonError<T>) -> Status
Converts to this type from the input type.
source§impl PartialEq<Status> for Status
impl PartialEq<Status> for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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