pub struct TriggerEngine { /* private fields */ }Expand description
The TriggerEngine manages predicates and runs actions when predicates are met
Implementations§
Source§impl TriggerEngine
impl TriggerEngine
pub fn new() -> Self
Sourcepub async fn tick(
&self,
dry: &mut DryContext,
wet: &mut WetContext,
) -> Result<(), OpError>
pub async fn tick( &self, dry: &mut DryContext, wet: &mut WetContext, ) -> Result<(), OpError>
Clock pulse - evaluate all predicates and run associated actions when/if they trigger
pub fn spawn(&self, name: &str) -> Result<Box<dyn Trigger>, String>
pub fn primary_registry(&self) -> &TriggerRegistry
pub fn primary_registry_mut(&mut self) -> &mut TriggerRegistry
pub fn secondary_registry(&self) -> &TriggerRegistry
pub fn secondary_registry_mut(&mut self) -> &mut TriggerRegistry
Trait Implementations§
Source§impl Debug for TriggerEngine
impl Debug for TriggerEngine
Auto Trait Implementations§
impl !RefUnwindSafe for TriggerEngine
impl !UnwindSafe for TriggerEngine
impl Freeze for TriggerEngine
impl Send for TriggerEngine
impl Sync for TriggerEngine
impl Unpin for TriggerEngine
impl UnsafeUnpin for TriggerEngine
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