pub struct InvalidValue {
pub code: Cow<'static, str>,
pub field: Field,
}
Expand description
Holds details about a constraint violation found by validating a constraint
in the FieldName
context.
Fields§
§code: Cow<'static, str>
Error code that identifies the exact error.
A client that receives the constraint violation should be able to interpret this error code.
field: Field
Details about the field having a value that violates a constraint.
Trait Implementations§
Source§impl Clone for InvalidValue
impl Clone for InvalidValue
Source§fn clone(&self) -> InvalidValue
fn clone(&self) -> InvalidValue
Returns a copy 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 InvalidValue
impl Debug for InvalidValue
Source§impl<'de> Deserialize<'de> for InvalidValue
impl<'de> Deserialize<'de> for InvalidValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for InvalidValue
impl Display for InvalidValue
Source§impl From<InvalidValue> for ConstraintViolation
impl From<InvalidValue> for ConstraintViolation
Source§fn from(invalid_value: InvalidValue) -> Self
fn from(invalid_value: InvalidValue) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InvalidValue
impl PartialEq for InvalidValue
Source§impl Serialize for InvalidValue
impl Serialize for InvalidValue
impl StructuralPartialEq for InvalidValue
Auto Trait Implementations§
impl Freeze for InvalidValue
impl RefUnwindSafe for InvalidValue
impl Send for InvalidValue
impl Sync for InvalidValue
impl Unpin for InvalidValue
impl UnwindSafe for InvalidValue
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