Skip to main content

NoteStore

Trait NoteStore 

Source
pub trait NoteStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn upsert_note<'life0, 'async_trait>(
        &'life0 self,
        note: Note,
    ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn upsert_notes<'life0, 'async_trait>(
        &'life0 self,
        notes: Vec<Note>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<BatchWriteSummary>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_note<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Option<Note>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_note<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
        mode: DeleteMode,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_notes<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        namespace: &'life1 str,
        kind: Option<&'life2 str>,
        page: PageRequest,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Page<Note>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn count_notes<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        namespace: &'life1 str,
        kind: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn get_notes_batch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ids: &'life1 [Uuid],
    ) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Note>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn upsert_note_if_below_quota<'life0, 'async_trait>(
        &'life0 self,
        note: Note,
        max_notes: u64,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn upsert_note<'life0, 'async_trait>( &'life0 self, note: Note, ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn upsert_notes<'life0, 'async_trait>( &'life0 self, notes: Vec<Note>, ) -> Pin<Box<dyn Future<Output = StorageResult<BatchWriteSummary>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_note<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = StorageResult<Option<Note>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete_note<'life0, 'async_trait>( &'life0 self, id: Uuid, mode: DeleteMode, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_notes<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, namespace: &'life1 str, kind: Option<&'life2 str>, page: PageRequest, ) -> Pin<Box<dyn Future<Output = StorageResult<Page<Note>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn count_notes<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, namespace: &'life1 str, kind: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

Source

fn get_notes_batch<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [Uuid], ) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Note>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn upsert_note_if_below_quota<'life0, 'async_trait>( &'life0 self, note: Note, max_notes: u64, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§