[−][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.
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]
fn clone(&self) -> RelatedFields
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
A: Into<Cow<'static, str>>,
B: Into<Cow<'static, str>>,
impl PartialEq<RelatedFields> for RelatedFields
[src]
fn eq(&self, other: &RelatedFields) -> bool
[src]
fn ne(&self, other: &RelatedFields) -> bool
[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]
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>
impl<T> Validate<MustMatch, RelatedFields> for (T, T) where
T: PartialEq + Into<Value>,
[src]
T: PartialEq + 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>
Auto Trait Implementations
impl RefUnwindSafe for RelatedFields
impl Send for RelatedFields
impl Sync for RelatedFields
impl Unpin for RelatedFields
impl UnwindSafe for RelatedFields
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>,