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§
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]
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".