[−][src]Struct valid::RelatedFields
Represents a pair of related fields as context for validation functions. It holds the names of the two related fields that are validated.
Methods
impl RelatedFields[src]
pub fn unwrap(self) -> (Cow<'static, str>, Cow<'static, str>)[src]
Unwraps this related fields context and returns the 2 field names
pub fn first(&self) -> &str[src]
Returns a reference to the name of the first field
pub fn second(&self) -> &str[src]
Returns a reference to the name of the second field
Trait Implementations
impl<T> Validate<MustMatch, RelatedFields> for (T, T) where
T: Eq + Into<Value>, [src]
T: Eq + Into<Value>,
fn validate(
self,
fields: impl Into<RelatedFields>,
_constraint: &MustMatch
) -> Validation<MustMatch, Self>[src]
self,
fields: impl Into<RelatedFields>,
_constraint: &MustMatch
) -> Validation<MustMatch, Self>
impl<T> Validate<FromTo, RelatedFields> for (T, T) where
T: PartialOrd + Into<Value>, [src]
T: PartialOrd + Into<Value>,
fn validate(
self,
fields: impl Into<RelatedFields>,
constraint: &FromTo
) -> Validation<FromTo, Self>[src]
self,
fields: impl Into<RelatedFields>,
constraint: &FromTo
) -> Validation<FromTo, Self>
impl<A, B> From<(A, B)> for RelatedFields where
A: Into<Cow<'static, str>>,
B: Into<Cow<'static, str>>, [src]
A: Into<Cow<'static, str>>,
B: Into<Cow<'static, str>>,
impl Clone for RelatedFields[src]
fn clone(&self) -> RelatedFields[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Eq for RelatedFields[src]
impl PartialEq<RelatedFields> for RelatedFields[src]
fn eq(&self, other: &RelatedFields) -> bool[src]
fn ne(&self, other: &RelatedFields) -> bool[src]
impl Debug for RelatedFields[src]
Auto Trait Implementations
impl Unpin for RelatedFields
impl Sync for RelatedFields
impl Send for RelatedFields
impl RefUnwindSafe for RelatedFields
impl UnwindSafe for RelatedFields
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,