pub struct ValidationErrors { /* private fields */ }Expand description
Field failures, keyed by field name, in field order.
A BTreeMap rather than a HashMap so the JSON body a client receives is
deterministic — otherwise the same invalid request would produce a
different key order each time, which makes responses awkward to snapshot,
cache or diff.
Implementations§
Trait Implementations§
Source§impl Clone for ValidationErrors
impl Clone for ValidationErrors
Source§impl Debug for ValidationErrors
impl Debug for ValidationErrors
Source§impl Default for ValidationErrors
impl Default for ValidationErrors
Source§impl Display for ValidationErrors
impl Display for ValidationErrors
impl Eq for ValidationErrors
Source§impl From<ValidationErrors> for Error
impl From<ValidationErrors> for Error
Source§fn from(errors: ValidationErrors) -> Self
fn from(errors: ValidationErrors) -> Self
A 422 carrying the failures as structured details, which the HTTP
layer renders without knowing anything about validation.
Source§impl PartialEq for ValidationErrors
impl PartialEq for ValidationErrors
impl StructuralPartialEq for ValidationErrors
Auto Trait Implementations§
impl Freeze for ValidationErrors
impl RefUnwindSafe for ValidationErrors
impl Send for ValidationErrors
impl Sync for ValidationErrors
impl Unpin for ValidationErrors
impl UnsafeUnpin for ValidationErrors
impl UnwindSafe for ValidationErrors
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