pub struct ProblemDetails {
pub error_type: String,
pub title: String,
pub status: u16,
pub detail: Option<String>,
pub instance: Option<String>,
pub extensions: HashMap<String, Value>,
}Expand description
RFC 9457 problem details for validation errors.
Fields§
§error_type: String§title: String§status: u16§detail: Option<String>§instance: Option<String>§extensions: HashMap<String, Value>Extended fields for dev mode
Implementations§
Source§impl ProblemDetails
impl ProblemDetails
pub fn validation_error(errors: &[ValidationError2], dev_mode: bool) -> Self
pub fn to_json(&self) -> String
Trait Implementations§
Source§impl Clone for ProblemDetails
impl Clone for ProblemDetails
Source§fn clone(&self) -> ProblemDetails
fn clone(&self) -> ProblemDetails
Returns a duplicate of the value. Read more
1.0.0 · 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 ProblemDetails
impl Debug 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 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