Skip to main content

Spotlight

Trait Spotlight 

Source
pub trait Spotlight: Send + 'static {
    // Required method
    fn new(ctx: &Context<'_>) -> Self;

    // Provided methods
    fn generate(
        &mut self,
        _ctx: &Context<'_>,
        _query: &str,
    ) -> Vec<SpotlightResult> { ... }
    fn activate(&mut self, _ctx: &Context<'_>, _index: usize) { ... }
    fn trigger_check(&self, _ctx: &Context<'_>, _query: &str) -> bool { ... }
    fn allows_triggers() -> bool { ... }
    fn display_styles() -> &'static [DisplayStyle] { ... }
}

Required Methods§

Source

fn new(ctx: &Context<'_>) -> Self

Provided Methods§

Source

fn generate(&mut self, _ctx: &Context<'_>, _query: &str) -> Vec<SpotlightResult>

Source

fn activate(&mut self, _ctx: &Context<'_>, _index: usize)

Source

fn trigger_check(&self, _ctx: &Context<'_>, _query: &str) -> bool

Source

fn allows_triggers() -> bool

Source

fn display_styles() -> &'static [DisplayStyle]

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§