[−][src]Enum valid::constraint::MustDefineRange
Two related fields must define a range.
This constraint is useful for structs with pairs of fields that define a
range such as valid_from
and valid_until
or min_salary
and
max_salary
.
The validation function can be applied in the RelatedFields
context.
It is implemented for all types T
that implement the PartialOrd
trait
and Into<Value
.
Variants
The first value must be less than or equal to the second value
The first value must be less than the second value
Trait Implementations
impl Clone for MustDefineRange
[src]
fn clone(&self) -> MustDefineRange
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MustDefineRange
[src]
impl Debug for MustDefineRange
[src]
impl Eq for MustDefineRange
[src]
impl PartialEq<MustDefineRange> for MustDefineRange
[src]
fn eq(&self, other: &MustDefineRange) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for MustDefineRange
[src]
impl StructuralPartialEq for MustDefineRange
[src]
impl<T> Validate<MustDefineRange, RelatedFields> for (T, T) where
T: PartialOrd + Into<Value>,
[src]
T: PartialOrd + Into<Value>,
fn validate(
self,
fields: impl Into<RelatedFields>,
constraint: &MustDefineRange
) -> Validation<MustDefineRange, Self>
[src]
self,
fields: impl Into<RelatedFields>,
constraint: &MustDefineRange
) -> Validation<MustDefineRange, Self>
Auto Trait Implementations
impl RefUnwindSafe for MustDefineRange
impl Send for MustDefineRange
impl Sync for MustDefineRange
impl Unpin for MustDefineRange
impl UnwindSafe for MustDefineRange
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,