pub struct TemporalRegistry { /* private fields */ }Expand description
Registry of temporal patterns evaluated on events and/or timer ticks.
Implementations§
Source§impl TemporalRegistry
impl TemporalRegistry
Sourcepub fn add(&mut self, pattern: TemporalPattern)
pub fn add(&mut self, pattern: TemporalPattern)
Add a pattern to the registry.
Sourcepub fn check_all(
&self,
state: &State,
event: Option<&SessionEvent>,
writer: &Arc<dyn SessionWriter>,
) -> Vec<BoxFuture<()>> ⓘ
pub fn check_all( &self, state: &State, event: Option<&SessionEvent>, writer: &Arc<dyn SessionWriter>, ) -> Vec<BoxFuture<()>> ⓘ
Check all patterns and return the futures for those that fired.
Called by the control-lane processor on each event and optionally on a periodic timer tick.
Sourcepub fn needs_timer(&self) -> bool
pub fn needs_timer(&self) -> bool
Returns true if any registered pattern’s detector needs periodic
timer checks (i.e. its PatternDetector::needs_timer returns true).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TemporalRegistry
impl !RefUnwindSafe for TemporalRegistry
impl Send for TemporalRegistry
impl Sync for TemporalRegistry
impl Unpin for TemporalRegistry
impl !UnwindSafe for TemporalRegistry
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