pub struct BpmEngine {
pub handlers: Vec<Box<dyn EventHandler>>,
}Expand description
BpmEngine aggregates handlers and runs event pump (design: overview §3).
Fields§
§handlers: Vec<Box<dyn EventHandler>>Implementations§
Source§impl BpmEngine
impl BpmEngine
pub fn new(handlers: Vec<Box<dyn EventHandler>>) -> Self
Sourcepub async fn run_async(&self, initial: EngineEvent, ctx: &mut EngineContext)
pub async fn run_async(&self, initial: EngineEvent, ctx: &mut EngineContext)
Run event pump with initial event (async; uses storage via ctx).
Auto Trait Implementations§
impl !RefUnwindSafe for BpmEngine
impl !UnwindSafe for BpmEngine
impl Freeze for BpmEngine
impl Send for BpmEngine
impl Sync for BpmEngine
impl Unpin for BpmEngine
impl UnsafeUnpin for BpmEngine
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