pub enum Rule {
Deny(String),
RequireField {
field: String,
pattern: Pattern,
},
ForbidField {
field: String,
},
}Expand description
What must hold about a subtree once the pattern matches.
Variants§
Deny(String)
Any match is a violation. The string is the reason/diagnostic.
RequireField
The matched subtree must be a struct-form containing field
with a value matching pattern.
ForbidField
The matched subtree must NOT contain field, or if it does, the
value must be Nil.
Trait Implementations§
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