pub struct EventDistributor { /* private fields */ }Expand description
Fan-out hub for one run.
Implementations§
Source§impl EventDistributor
impl EventDistributor
Sourcepub fn subscribe(
&mut self,
name: impl Into<String>,
policy: SubscriberPolicy,
capacity: usize,
) -> CanonicalEventSubscription
pub fn subscribe( &mut self, name: impl Into<String>, policy: SubscriberPolicy, capacity: usize, ) -> CanonicalEventSubscription
Add a subscriber; returns its exclusive subscription.
Sourcepub async fn publish(&self, event: InterpreterOutputEvent)
pub async fn publish(&self, event: InterpreterOutputEvent)
Publish one interpreter event to every subscriber.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventDistributor
impl RefUnwindSafe for EventDistributor
impl Send for EventDistributor
impl Sync for EventDistributor
impl Unpin for EventDistributor
impl UnsafeUnpin for EventDistributor
impl UnwindSafe for EventDistributor
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