pub struct ProblemDetails { /* private fields */ }Expand description
Sanitized RFC 7807 fields; no response body or unknown extension is retained.
Implementations§
Source§impl ProblemDetails
impl ProblemDetails
Sourcepub fn from_value(value: &Value) -> Option<Self>
pub fn from_value(value: &Value) -> Option<Self>
Recognize a problem envelope and preserve only exact frozen protocol vocabulary.
Sourcepub fn parse(bytes: &[u8]) -> Result<Option<Self>>
pub fn parse(bytes: &[u8]) -> Result<Option<Self>>
Parse at most 1 MiB; malformed or unrelated JSON is not a problem envelope.
pub fn title(&self) -> Option<&'static str>
pub fn detail(&self) -> Option<&'static str>
pub fn errors(&self) -> Option<&[ProblemFieldError]>
pub fn redacted(&self) -> bool
Trait Implementations§
Source§impl Clone for ProblemDetails
impl Clone for ProblemDetails
Source§impl Debug for ProblemDetails
impl Debug for ProblemDetails
impl Eq for ProblemDetails
Source§impl PartialEq for ProblemDetails
impl PartialEq for ProblemDetails
Source§impl Serialize for ProblemDetails
impl Serialize for ProblemDetails
impl StructuralPartialEq for ProblemDetails
Auto Trait Implementations§
impl Freeze for ProblemDetails
impl RefUnwindSafe for ProblemDetails
impl Send for ProblemDetails
impl Sync for ProblemDetails
impl Unpin for ProblemDetails
impl UnsafeUnpin for ProblemDetails
impl UnwindSafe for ProblemDetails
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.