#[non_exhaustive]pub enum Rule {
Range,
Step,
Length,
Pattern,
Variant,
Unique,
}Expand description
The kind of typl constraint a Violation breaks.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Range
A number is outside its declared range.
Step
A number is not its range’s lower bound plus a whole multiple of its declared step.
Length
A string, a byte sequence or a collection is outside its declared length bounds.
Pattern
A string does not match its declared pattern.
Variant
A discriminant names no declared variant.
Unique
A map contains more than one entry with the same key.
Trait Implementations§
impl Copy for Rule
impl Eq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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