pub enum RuleKindSpec {
Required(String),
Unique(String),
Range {
field: String,
min: Option<Box<Expr>>,
max: Option<Box<Expr>>,
},
Matches(String, LitStr),
Criteria(String, LitStr),
UniqueTogether(String, Vec<String>),
}Expand description
What a rule checks.
Variants§
Required(String)
#[field(required)].
Unique(String)
#[field(unique)].
Range
#[field(min = .., max = ..)].
Fields
Matches(String, LitStr)
#[field(matches = "...")].
Criteria(String, LitStr)
#[rule(criteria = "...")], with its id.
UniqueTogether(String, Vec<String>)
#[rule(unique = "a,b")], with its id.
Trait Implementations§
Source§impl Clone for RuleKindSpec
impl Clone for RuleKindSpec
Source§fn clone(&self) -> RuleKindSpec
fn clone(&self) -> RuleKindSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Send for RuleKindSpec
impl !Sync for RuleKindSpec
impl Freeze for RuleKindSpec
impl RefUnwindSafe for RuleKindSpec
impl Unpin for RuleKindSpec
impl UnsafeUnpin for RuleKindSpec
impl UnwindSafe for RuleKindSpec
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