pub enum DependencyCondition {
RequiredWhenExists,
RequiredWhenEquals(String),
ForbiddenWhenExists,
MustMatch,
MustDiffer,
}
Expand description
Dependency condition for cross-attribute validation
Variants§
RequiredWhenExists
Required when dependent attribute exists
RequiredWhenEquals(String)
Required when dependent attribute has specific value
ForbiddenWhenExists
Forbidden when dependent attribute exists
MustMatch
Must have same value as dependent attribute
MustDiffer
Must have different value from dependent attribute
Trait Implementations§
Source§impl Clone for DependencyCondition
impl Clone for DependencyCondition
Source§fn clone(&self) -> DependencyCondition
fn clone(&self) -> DependencyCondition
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 DependencyCondition
impl Debug for DependencyCondition
Source§impl<'de> Deserialize<'de> for DependencyCondition
impl<'de> Deserialize<'de> for DependencyCondition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DependencyCondition
impl PartialEq for DependencyCondition
Source§impl Serialize for DependencyCondition
impl Serialize for DependencyCondition
impl Eq for DependencyCondition
impl StructuralPartialEq for DependencyCondition
Auto Trait Implementations§
impl Freeze for DependencyCondition
impl RefUnwindSafe for DependencyCondition
impl Send for DependencyCondition
impl Sync for DependencyCondition
impl Unpin for DependencyCondition
impl UnwindSafe for DependencyCondition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.