Skip to main content

EventAck

Type Alias EventAck 

Source
pub type EventAck = Sender<()>;
Expand description

The completion signal an awaited publish threads through a plugin sink (OA.14d). The bus mints one per matched plugin subscription and EventBus::publish_awaited returns the matching receivers; the plugin’s actor drops it once the guest handler has returned.

It is a bare oneshot::Sender<()> deliberately: dropping it resolves the receiver with Err, so a handler that traps, a store that is quarantined, and an actor whose task was aborted all release the waiter without anyone having to remember to signal. There is no way to hold the loader open by forgetting a line.

None on every ordinary publish, which is all of them but one — the bus is fire-and-forget by design, and this exists for the single event whose whole purpose is to happen before something else (Event::PrePluginLoaded).

Aliased Type§

pub struct EventAck { /* private fields */ }