Skip to main content

PhaseEffectSink

Trait PhaseEffectSink 

Source
pub trait PhaseEffectSink: Send + Sync {
    // Required method
    fn apply_phase_effect<'life0, 'async_trait>(
        &'life0 self,
        effect: PhaseEffect,
    ) -> Pin<Box<dyn Future<Output = Result<Event>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn emit_phase_event<'life0, 'async_trait>(
        &'life0 self,
        request: EventRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Event>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Host-applied sink for live phase effects.

Engine phase constructors adapt the host’s existing EventEmitter to this contract, so custom hosts retain the open event-storage boundary while phase algorithms no longer invoke the persistence-shaped operation directly.

Required Methods§

Source

fn apply_phase_effect<'life0, 'async_trait>( &'life0 self, effect: PhaseEffect, ) -> Pin<Box<dyn Future<Output = Result<Event>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Apply one phase effect and return the accepted canonical event.

Provided Methods§

Source

fn emit_phase_event<'life0, 'async_trait>( &'life0 self, request: EventRequest, ) -> Pin<Box<dyn Future<Output = Result<Event>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Convenience for the common canonical-event effect.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§