Skip to main content

SpotlightObject

Trait SpotlightObject 

Source
pub trait SpotlightObject: Send + 'static {
    // Required methods
    fn generate(
        &mut self,
        ctx: &Context<'_>,
        query: RStr<'_>,
    ) -> RVec<SpotlightResult>;
    fn activate(&mut self, ctx: &Context<'_>, index: usize);
    fn trigger_check(&self, ctx: &Context<'_>, query: RStr<'_>) -> bool;
    fn allows_triggers(&self) -> bool;
    fn display_styles(&self) -> u32;
}

Required Methods§

Source

fn generate( &mut self, ctx: &Context<'_>, query: RStr<'_>, ) -> RVec<SpotlightResult>

Source

fn activate(&mut self, ctx: &Context<'_>, index: usize)

Source

fn trigger_check(&self, ctx: &Context<'_>, query: RStr<'_>) -> bool

Source

fn allows_triggers(&self) -> bool

Source

fn display_styles(&self) -> u32

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<_ErasedPtr> SpotlightObject for SpotlightObject_TO<_ErasedPtr>
where Self: Send + 'static, _ErasedPtr: AsMutPtr<PtrTarget = ()>,