Skip to main content

Injector

Trait Injector 

Source
pub trait Injector: Send + Sync {
    // Required methods
    fn inject(&self, cmd: &InjectionCommand) -> Result<(), AppError>;
    fn label(&self) -> &str;

    // Provided methods
    fn semantic_event(&self, _event: &SemanticEvent) -> Result<(), AppError> { ... }
    fn supports_events(&self) -> bool { ... }
}
Expand description

Replays an InjectionCommand as local OS keystrokes.

Required Methods§

Source

fn inject(&self, cmd: &InjectionCommand) -> Result<(), AppError>

Replay one command. A per-command failure is logged by the caller and does not tear down the daemon.

Source

fn label(&self) -> &str

Short human label (for omni daemon startup logging).

Provided Methods§

Source

fn semantic_event(&self, _event: &SemanticEvent) -> Result<(), AppError>

Additive application-event hook. Never fall back to OS injection.

Source

fn supports_events(&self) -> bool

Implementors§