Skip to main content

ProducerSignal

Trait ProducerSignal 

Source
pub trait ProducerSignal:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn variant_id(&self) -> EffectVariantId;
    fn field(&self, id: &FieldId) -> Option<FieldValue<'_>>;
}
Expand description

Marker trait for the seam-signal source sum consumed by CompositionSignalDispatcher.

Signal-kind composition routes use the same producer-side EffectVariantId namespace as input routes, but their target is a consumer SignalVariantId. This trait mirrors ProducerEffect so signal dispatch has the same typed projection discipline without requiring callers to smuggle signal payloads through the input dispatcher.

Required Methods§

Source

fn variant_id(&self) -> EffectVariantId

Typed producer-side variant id for this signal source value.

Source

fn field(&self, id: &FieldId) -> Option<FieldValue<'_>>

Borrow a producer field by FieldId.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§