pub struct ProblemError {
pub status: u16,
pub kind: Option<ProblemId>,
pub problem: Option<Problem>,
pub detail: String,
}Expand description
What the API answered when it did not answer a success.
Every problem the document names is one of these, told apart by the kind it carries; the document the API sent, when it sent one this crate can read, is beside it. A body naming no problem still reaches a caller as one of these, carrying no kind.
Fields§
§status: u16Status the API answered under.
kind: Option<ProblemId>Problem the API named, absent when the body named none.
problem: Option<Problem>Document the API answered, absent when it answered none this crate can read.
detail: StringWhat to say about the failure, as much of the API’s answer as fits included.
Trait Implementations§
Source§impl Clone for ProblemError
impl Clone for ProblemError
Source§fn clone(&self) -> ProblemError
fn clone(&self) -> ProblemError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProblemError
impl Debug for ProblemError
Source§impl Display for ProblemError
impl Display for ProblemError
Source§impl Error for ProblemError
impl Error for ProblemError
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()
Auto Trait Implementations§
impl Freeze for ProblemError
impl RefUnwindSafe for ProblemError
impl Send for ProblemError
impl Sync for ProblemError
impl Unpin for ProblemError
impl UnsafeUnpin for ProblemError
impl UnwindSafe for ProblemError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more