Module rules

Source
Expand description

A module that contains all the rules

Structs§

All
Rule to constrain an iterable collection (with reference) to valid the specified rule and an error message
And
Rule to ensure that 2 other rules are Ok.
Any
Rule to constrain an iterable collection (with reference) to valid that any element of the collection valid the specified rule
Eval
Rule to constrain any type to a predicate
In
Rule to constrain a type to be in a collection
MaxLength
Rule to constraint the maximum length of any type that implements AsRef<str> such as String or &str
MaxRange
Rule to constraint the maximum range of any type that implement PartialOrd
MaxSize
Rule to constraint the maximum size of a Vec<T>
MinLength
Rule to constraint the minimum length of any type that implements AsRef<str> such as String or &str
MinMaxLength
Rule to constraint the minimum and maximum length of any type that implements AsRef<str> such as String or &str
MinMaxRange
Rule to constraint the minimum and maximum range of any type that implement PartialOrd
MinMaxSize
Rule to constraint the minimum and maximum size of a Vec<T>
MinRange
Rule to constraint the minimum range of any type that implement PartialOrd
MinSize
Rule to constraint the minimum size of a Vec<T>
Opt
Rule to apply another rule to inner value of an Option
Or
Rule to apply an Or condition on two rules.
RegExregex
Rule to constraint any type that implements AsRef<str> such as String or &str to match a Regex
Validate
Rule to check the rules of the inner type

Traits§

Rule
Define a rule for a type