Skip to main content

NoteBrowserProvider

Trait NoteBrowserProvider 

Source
pub trait NoteBrowserProvider: Send + Sync {
    // Required method
    fn load<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Vec<FileListEntry>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn allows_create(&self) -> bool { ... }
}

Required Methods§

Source

fn load<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, ) -> Pin<Box<dyn Future<Output = Vec<FileListEntry>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Called on every query change. Empty string = initial/empty state (recent notes).

Provided Methods§

Source

fn allows_create(&self) -> bool

Whether to prepend a “Create: ” entry when query is non-empty. Defaults to false. Used by future FileFinderProvider.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§