pub enum SubscriptionTarget {
Channel(UnboundedSender<Event>),
Invocation(CommandInvocation),
Plugin {
plugin: u32,
handler: u32,
sink: PluginEventSink,
},
}Expand description
What the bus does when a matching event arrives.
Variants§
Channel(UnboundedSender<Event>)
Push the event onto an unbounded mpsc. Closed senders are pruned lazily on the next publish that hits this kind.
Invocation(CommandInvocation)
Run a [CommandInvocation] in response. v1 does NOT execute
it (the bus has no document handle); instead it stores the
invocation and surfaces it via EventBus::drain_pending_invocations
for the App to dispatch on its turn through the actor. This
keeps the bus loop-free and side-effect-free with respect
to document state.
Plugin
Deliver the event to a WASM plugin’s on-event handler (PH7.8, filling
the reserved slot §5.10 anticipated). The host owns the sink (over the
plugin’s actor channel); the bus calls it with the lock dropped, so a
slow plugin handler never delays the publisher or another subscriber.
plugin / handler identify the subscription for provenance and
teardown (the host unsubscribes a quarantined plugin’s ids); sink
carries the delivery + the closed-receiver signal (false → prune).
Trait Implementations§
Source§impl Clone for SubscriptionTarget
impl Clone for SubscriptionTarget
Source§fn clone(&self) -> SubscriptionTarget
fn clone(&self) -> SubscriptionTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more