pub trait CompositionSignalDispatcher: Send + Sync {
type Signal: ProducerSignal;
// Required methods
fn composition(&self) -> &CompositionId;
fn dispatch_signal<'life0, 'async_trait>(
&'life0 self,
producer: ProducerInstance,
signal: SignalPayload<Self::Signal>,
) -> Pin<Box<dyn Future<Output = Result<SignalDispatchOutcome, SignalDispatchRefusal>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Composition signal dispatcher trait.
Required Associated Types§
Sourcetype Signal: ProducerSignal
type Signal: ProducerSignal
Seam-signal source sum this dispatcher handles.
Required Methods§
Sourcefn composition(&self) -> &CompositionId
fn composition(&self) -> &CompositionId
Composition id this dispatcher owns.
Sourcefn dispatch_signal<'life0, 'async_trait>(
&'life0 self,
producer: ProducerInstance,
signal: SignalPayload<Self::Signal>,
) -> Pin<Box<dyn Future<Output = Result<SignalDispatchOutcome, SignalDispatchRefusal>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dispatch_signal<'life0, 'async_trait>(
&'life0 self,
producer: ProducerInstance,
signal: SignalPayload<Self::Signal>,
) -> Pin<Box<dyn Future<Output = Result<SignalDispatchOutcome, SignalDispatchRefusal>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dispatch a routed signal. Returns SignalDispatchOutcome on
success or a typed SignalDispatchRefusal.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".