Skip to main content

TurnItemEmitter

Trait TurnItemEmitter 

Source
pub trait TurnItemEmitter: Send + Sync {
    // Required methods
    fn emit_started<'a>(
        &'a self,
        item: ExtensionTurnItem,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>;
    fn emit_completed<'a>(
        &'a self,
        item: ExtensionTurnItem,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>;
}
Expand description

Host-provided capability for extension tools to emit visible turn items.

Implementations route lifecycle events through the host’s normal item event pipeline and client delivery.

Required Methods§

Source

fn emit_started<'a>( &'a self, item: ExtensionTurnItem, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>

Emits the beginning of one visible turn item.

Source

fn emit_completed<'a>( &'a self, item: ExtensionTurnItem, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>

Emits one completed visible turn item.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§