pub enum Condition<T> {
Is(Vec<T>),
Not(Vec<T>),
Any,
None,
}
Expand description
A basic “is” or “is not” condition criteria.
Variants§
Is(Vec<T>)
Matches when the input is one of the values in the Vec.
Not(Vec<T>)
Matches when the input isn’t one of the values in the Vec.
Any
Matches any value.
None
Matches no value.
Trait Implementations§
Source§impl<T: Clone + Copy + PartialEq + Eq + Hash> Criteria for Condition<T>
impl<T: Clone + Copy + PartialEq + Eq + Hash> Criteria for Condition<T>
Source§fn is_match(&self, i: &Self::Input) -> bool
fn is_match(&self, i: &Self::Input) -> bool
Checks whether a given input is a match for a specific criteria.
Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Checks if the
Criteria
represents an empty criteria that doesn’t match any input. Read moreSource§fn evaluation_order(&self) -> usize
fn evaluation_order(&self) -> usize
The evaluation order of the
Criteria
defines the order in which the state transitiosn are
evaluated. Criteria with smaller evaluation order is processed first. Read moreimpl<T: Eq> Eq for Condition<T>
impl<T> StructuralPartialEq for Condition<T>
Auto Trait Implementations§
impl<T> Freeze for Condition<T>
impl<T> RefUnwindSafe for Condition<T>where
T: RefUnwindSafe,
impl<T> Send for Condition<T>where
T: Send,
impl<T> Sync for Condition<T>where
T: Sync,
impl<T> Unpin for Condition<T>where
T: Unpin,
impl<T> UnwindSafe for Condition<T>where
T: UnwindSafe,
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