ReactorRule

Trait ReactorRule 

Source
pub trait ReactorRule: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn react(
        &self,
        event: &ReactorEvent,
        voice: &VoiceRuntimeState,
    ) -> Vec<Reaction>;
}
Expand description

A rule that reacts to normalized events and emits typed effects.

Required Methods§

Source

fn name(&self) -> &str

Stable rule name for diagnostics and reaction provenance.

Source

fn react( &self, event: &ReactorEvent, voice: &VoiceRuntimeState, ) -> Vec<Reaction>

Produce reactions for a normalized event.

Implementors§