Struct TemporalRegistry
pub struct TemporalRegistry { /* private fields */ }Expand description
Registry of temporal patterns evaluated on events and/or timer ticks.
Implementations§
§impl TemporalRegistry
impl TemporalRegistry
pub fn new() -> TemporalRegistry
pub fn new() -> TemporalRegistry
Create an empty registry.
pub fn add(&mut self, pattern: TemporalPattern)
pub fn add(&mut self, pattern: TemporalPattern)
Add a pattern to the registry.
pub fn check_all(
&self,
state: &State,
event: Option<&SessionEvent>,
writer: &Arc<dyn SessionWriter>,
) -> Vec<Pin<Box<dyn Future<Output = ()> + Send>>>
pub fn check_all( &self, state: &State, event: Option<&SessionEvent>, writer: &Arc<dyn SessionWriter>, ) -> Vec<Pin<Box<dyn Future<Output = ()> + Send>>>
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.
pub 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§
§impl Default for TemporalRegistry
impl Default for TemporalRegistry
§fn default() -> TemporalRegistry
fn default() -> TemporalRegistry
Returns the “default value” for a type. Read more
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