gravel_ffi

Trait FrontendContext

source
pub trait FrontendContext {
    // Required methods
    fn query(&self, query: RString) -> u32;
    fn run_hit_action(&self, hit: &ArcDynHit, kind: ActionKind);
}
Expand description

Context object providing core functionality to the Frontend.

Required Methods§

source

fn query(&self, query: RString) -> u32

Runs the query against configured providers and returns results.

The return value is a token unique to each query, allowing frontends to ignore out-of-date results in lieu of cancellations.

source

fn run_hit_action(&self, hit: &ArcDynHit, kind: ActionKind)

Executes the passed hit’s action.

Implementors§