pub enum SubClause<Id>{
Always,
HasAttrValue(Id, Attribute, AttrValue),
HasState(Id, State),
IsMounted(Id),
Not(Box<SubClause<Id>>),
And(Box<SubClause<Id>>, Box<SubClause<Id>>),
Or(Box<SubClause<Id>>, Box<SubClause<Id>>),
}
Expand description
A subclause indicates the condition that must be satisfied in order to forward ev
to target
.
Usually clauses are single conditions, but there are also some special condition, to create “ligatures”, which are:
Not(SubClause)
: Negates inner conditionAnd(SubClause, SubClause)
: the AND of the two clauses must betrue
Or(SubClause, SubClause)
: the OR of the two clauses must betrue
Variants§
Always
Always forward event to component
HasAttrValue(Id, Attribute, AttrValue)
Forward event if target component has provided attribute with the provided value
If the attribute doesn’t exist on component, result is always false
.
HasState(Id, State)
Forward event if target component has provided state
IsMounted(Id)
Forward event if target component is mounted
Not(Box<SubClause<Id>>)
Forward event if the inner clause is false
And(Box<SubClause<Id>>, Box<SubClause<Id>>)
Forward event if both the inner clauses are true
Or(Box<SubClause<Id>>, Box<SubClause<Id>>)
Forward event if at least one of the inner clauses is true
Implementations§
Trait Implementations§
source§impl<Id> PartialEq for SubClause<Id>
impl<Id> PartialEq for SubClause<Id>
impl<Id> StructuralPartialEq for SubClause<Id>
Auto Trait Implementations§
impl<Id> RefUnwindSafe for SubClause<Id>where
Id: RefUnwindSafe,
impl<Id> Send for SubClause<Id>where
Id: Send,
impl<Id> Sync for SubClause<Id>where
Id: Sync,
impl<Id> Unpin for SubClause<Id>where
Id: Unpin,
impl<Id> UnwindSafe for SubClause<Id>where
Id: 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