pub struct TwoLaneEventBus { /* private fields */ }Expand description
In-process two-lane event bus with synchronous and asynchronous handlers.
Sync-lane handlers run inline and preserve InProcessEventBus failure and
ordering semantics. Async-lane handlers are handed to a detached in-process
carrier so their failures never propagate to the publisher.
Implementations§
Source§impl TwoLaneEventBus
impl TwoLaneEventBus
Sourcepub fn with_async_bus(async_bus: Arc<dyn EventBus>) -> Self
pub fn with_async_bus(async_bus: Arc<dyn EventBus>) -> Self
Create a two-lane bus whose async lane uses an external carrier.
Sourcepub async fn sync_handler_count(&self) -> usize
pub async fn sync_handler_count(&self) -> usize
Get the number of sync-lane handlers.
Sourcepub async fn async_handler_count(&self) -> usize
pub async fn async_handler_count(&self) -> usize
Get the number of async-lane handlers.
Trait Implementations§
Source§impl Clone for TwoLaneEventBus
impl Clone for TwoLaneEventBus
Source§fn clone(&self) -> TwoLaneEventBus
fn clone(&self) -> TwoLaneEventBus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for TwoLaneEventBus
impl Default for TwoLaneEventBus
Auto Trait Implementations§
impl !RefUnwindSafe for TwoLaneEventBus
impl !UnwindSafe for TwoLaneEventBus
impl Freeze for TwoLaneEventBus
impl Send for TwoLaneEventBus
impl Sync for TwoLaneEventBus
impl Unpin for TwoLaneEventBus
impl UnsafeUnpin for TwoLaneEventBus
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