pub struct CatalogCompositionSignalDispatcher<S: ProducerSignal> { /* private fields */ }Expand description
Default catalog-backed signal dispatcher.
This is the signal-kind mirror of CatalogCompositionDispatcher:
it consumes the same RouteTable but resolves through the signal
index and delivers to SignalConsumerSurface.
Implementations§
Source§impl<S: ProducerSignal> CatalogCompositionSignalDispatcher<S>
impl<S: ProducerSignal> CatalogCompositionSignalDispatcher<S>
Sourcepub fn new(composition: CompositionId, table: RouteTable) -> Self
pub fn new(composition: CompositionId, table: RouteTable) -> Self
Build a new signal dispatcher for composition.
Sourcepub fn with_consumer(self, surface: Arc<dyn SignalConsumerSurface>) -> Self
pub fn with_consumer(self, surface: Arc<dyn SignalConsumerSurface>) -> Self
Register a signal consumer surface for a target instance.
Trait Implementations§
Source§impl<S: ProducerSignal> CompositionSignalDispatcher for CatalogCompositionSignalDispatcher<S>
impl<S: ProducerSignal> CompositionSignalDispatcher for CatalogCompositionSignalDispatcher<S>
Source§fn composition(&self) -> &CompositionId
fn composition(&self) -> &CompositionId
Composition id this dispatcher owns.
Source§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,
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.Auto Trait Implementations§
impl<S> Freeze for CatalogCompositionSignalDispatcher<S>
impl<S> !RefUnwindSafe for CatalogCompositionSignalDispatcher<S>
impl<S> Send for CatalogCompositionSignalDispatcher<S>
impl<S> Sync for CatalogCompositionSignalDispatcher<S>
impl<S> Unpin for CatalogCompositionSignalDispatcher<S>
impl<S> UnsafeUnpin for CatalogCompositionSignalDispatcher<S>
impl<S> !UnwindSafe for CatalogCompositionSignalDispatcher<S>
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