pub struct RelatedFields(pub Cow<'static, str>, pub Cow<'static, str>);Expand description
Represents a pair of related fields as context for validation functions. It holds the names of the two related fields that are validated.
Tuple Fields§
§0: Cow<'static, str>§1: Cow<'static, str>Implementations§
Trait Implementations§
Source§impl Clone for RelatedFields
impl Clone for RelatedFields
Source§fn clone(&self) -> RelatedFields
fn clone(&self) -> RelatedFields
Returns a duplicate 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 RelatedFields
impl Debug for RelatedFields
Source§impl<A, B> From<(A, B)> for RelatedFields
impl<A, B> From<(A, B)> for RelatedFields
Source§impl PartialEq for RelatedFields
impl PartialEq for RelatedFields
Source§impl<T> Validate<MustDefineRange, RelatedFields> for (T, T)
impl<T> Validate<MustDefineRange, RelatedFields> for (T, T)
Source§fn validate(
self,
fields: impl Into<RelatedFields>,
constraint: &MustDefineRange,
) -> Validation<MustDefineRange, Self>
fn validate( self, fields: impl Into<RelatedFields>, constraint: &MustDefineRange, ) -> Validation<MustDefineRange, Self>
Validates this value for being compliant to the specified constraint
C in the given context S.Source§impl<T> Validate<MustMatch, RelatedFields> for (T, T)
impl<T> Validate<MustMatch, RelatedFields> for (T, T)
Source§fn validate(
self,
fields: impl Into<RelatedFields>,
_constraint: &MustMatch,
) -> Validation<MustMatch, Self>
fn validate( self, fields: impl Into<RelatedFields>, _constraint: &MustMatch, ) -> Validation<MustMatch, Self>
Validates this value for being compliant to the specified constraint
C in the given context S.impl Eq for RelatedFields
impl StructuralPartialEq for RelatedFields
Auto Trait Implementations§
impl Freeze for RelatedFields
impl RefUnwindSafe for RelatedFields
impl Send for RelatedFields
impl Sync for RelatedFields
impl Unpin for RelatedFields
impl UnwindSafe for RelatedFields
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