[][src]Struct valid::RelatedFields

pub struct RelatedFields(pub Cow<'static, str>, pub Cow<'static, str>);

Represents a pair of related fields as context for validation functions. It holds the names of the two related fields that are validated.

Implementations

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 Clone for RelatedFields[src]

impl Debug for RelatedFields[src]

impl Eq for RelatedFields[src]

impl<A, B> From<(A, B)> for RelatedFields where
    A: Into<Cow<'static, str>>,
    B: Into<Cow<'static, str>>, 
[src]

impl PartialEq<RelatedFields> for RelatedFields[src]

impl StructuralEq for RelatedFields[src]

impl StructuralPartialEq for RelatedFields[src]

impl<T> Validate<MustDefineRange, RelatedFields> for (T, T) where
    T: PartialOrd + Into<Value>, 
[src]

impl<T> Validate<MustMatch, RelatedFields> for (T, T) where
    T: PartialEq + Into<Value>, 
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.