Struct component_events::sequence::EventGroup
source · pub struct EventGroup { /* private fields */ }
Implementations§
source§impl EventGroup
impl EventGroup
pub fn new( events: Vec<EventMatcher>, ordering: Ordering, contains: Contains ) -> Self
pub fn is_empty(&self) -> bool
pub fn event_names(&self) -> Result<Vec<String>, Error>
sourcepub fn next(&mut self, event: &EventDescriptor) -> Result<bool, Error>
pub fn next(&mut self, event: &EventDescriptor) -> Result<bool, Error>
Returns true if event
matches an event matcher in this group.
If the group ordering is Ordered, the event must match the first matcher. If the group ordering is Unordered, the event can match any matcher in the group. The matcher is removed after a successful match.
Returns an error if the event does not match a matcher and the contains policy is All, indicating that the unknown event did not match the group.
Returns Ok(true) if there is a positive match. Returns Ok(false) if the EventGroup is empty.
Trait Implementations§
source§impl Clone for EventGroup
impl Clone for EventGroup
source§fn clone(&self) -> EventGroup
fn clone(&self) -> EventGroup
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for EventGroup
impl Send for EventGroup
impl Sync for EventGroup
impl Unpin for EventGroup
impl UnwindSafe for EventGroup
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