pub struct Dispatcher { /* private fields */ }Expand description
AsyncEventDispatcher.
Implementations§
Source§impl Dispatcher
impl Dispatcher
pub fn new( options: DispatcherOptions, lanes: Arc<dyn EventLanes>, ) -> Arc<Dispatcher> ⓘ
pub fn enabled(&self) -> bool
Sourcepub fn publish(&self, event: RuntimeEvent)
pub fn publish(&self, event: RuntimeEvent)
A completion: delivered after the coalescing window with the others of its lane.
Sourcepub fn run_ended(&self, lane: &str, run_id: &str, aborted: bool)
pub fn run_ended(&self, lane: &str, run_id: &str, aborted: bool)
The harness’s run_end of lane: an aborted root turn’s root never restarts work, and steers the run did
not consume are taken back.
Sourcepub fn drain(&self)
pub fn drain(&self)
Deliver now, bypassing the coalescing window (tests, shutdown); returns once delivered.
Sourcepub fn pending_for(&self, lane: &str) -> usize
pub fn pending_for(&self, lane: &str) -> usize
Events for lane waiting to be delivered, or steered into a run that has not consumed them yet.
Sourcepub fn root_aborted(&self, root: Option<&str>) -> bool
pub fn root_aborted(&self, root: Option<&str>) -> bool
Whether a root turn was aborted (its work never restarts the model).
Trait Implementations§
Source§impl Drop for Dispatcher
impl Drop for Dispatcher
Auto Trait Implementations§
impl !Freeze for Dispatcher
impl Forget for Dispatcher
impl Move for Dispatcher
impl RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl UnsafeUnpin for Dispatcher
impl UnwindSafe for Dispatcher
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