pub struct FieldValidationError {
pub field_name: String,
pub message: String,
pub code: String,
pub params: HashMap<String, String>,
}Expand description
A validation error for a single field.
Carries the field name, a human-readable message, an error code
for programmatic handling, and optional parameters for message
interpolation (e.g., max_length in a length violation).
Fields§
§field_name: StringThe field that failed validation.
message: StringHuman-readable error message.
code: StringMachine-readable error code (e.g., “required”, “max_length”, “invalid”).
params: HashMap<String, String>Additional parameters for the error (e.g., {“max_length”: “100”}).
Trait Implementations§
Source§impl Clone for FieldValidationError
impl Clone for FieldValidationError
Source§fn clone(&self) -> FieldValidationError
fn clone(&self) -> FieldValidationError
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 moreAuto Trait Implementations§
impl Forget for FieldValidationError
impl Freeze for FieldValidationError
impl Move for FieldValidationError
impl RefUnwindSafe for FieldValidationError
impl Send for FieldValidationError
impl Sync for FieldValidationError
impl Unpin for FieldValidationError
impl UnsafeUnpin for FieldValidationError
impl UnwindSafe for FieldValidationError
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> 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