pub enum FieldErrors {
Simple(Vec<ValidationError>),
Nested(Box<ValidationErrors>),
List(BTreeMap<usize, Box<ValidationErrors>>),
Map(BTreeMap<String, Box<ValidationErrors>>),
}Expand description
Container for field-level errors, supporting nested structures.
Variants§
Simple(Vec<ValidationError>)
Simple list of errors for this field
Nested(Box<ValidationErrors>)
Nested struct errors
List(BTreeMap<usize, Box<ValidationErrors>>)
List/array item errors (index -> errors)
Map(BTreeMap<String, Box<ValidationErrors>>)
Map item errors (key -> errors)
Implementations§
Source§impl FieldErrors
impl FieldErrors
Sourcepub fn simple(errors: Vec<ValidationError>) -> Self
pub fn simple(errors: Vec<ValidationError>) -> Self
Create simple field errors
Sourcepub fn nested(errors: ValidationErrors) -> Self
pub fn nested(errors: ValidationErrors) -> Self
Create nested struct errors
Trait Implementations§
Source§impl Clone for FieldErrors
impl Clone for FieldErrors
Source§fn clone(&self) -> FieldErrors
fn clone(&self) -> FieldErrors
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 moreAuto Trait Implementations§
impl Freeze for FieldErrors
impl RefUnwindSafe for FieldErrors
impl Send for FieldErrors
impl Sync for FieldErrors
impl Unpin for FieldErrors
impl UnwindSafe for FieldErrors
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