Trait backend::DataProvider

source ·
pub trait DataProvider {
    // Required methods
    fn load_all_entries<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Entry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_entry<'life0, 'async_trait>(
        &'life0 self,
        entry: EntryDraft
    ) -> Pin<Box<dyn Future<Output = Result<Entry, ModifyEntryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove_entry<'life0, 'async_trait>(
        &'life0 self,
        entry_id: u32
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_entry<'life0, 'async_trait>(
        &'life0 self,
        entry: Entry
    ) -> Pin<Box<dyn Future<Output = Result<Entry, ModifyEntryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_export_object<'life0, 'life1, 'async_trait>(
        &'life0 self,
        entries_ids: &'life1 [u32]
    ) -> Pin<Box<dyn Future<Output = Result<EntriesDTO>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn import_entries<'life0, 'async_trait>(
        &'life0 self,
        entries_dto: EntriesDTO
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn load_all_entries<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<Entry>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn add_entry<'life0, 'async_trait>( &'life0 self, entry: EntryDraft ) -> Pin<Box<dyn Future<Output = Result<Entry, ModifyEntryError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn remove_entry<'life0, 'async_trait>( &'life0 self, entry_id: u32 ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn update_entry<'life0, 'async_trait>( &'life0 self, entry: Entry ) -> Pin<Box<dyn Future<Output = Result<Entry, ModifyEntryError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_export_object<'life0, 'life1, 'async_trait>( &'life0 self, entries_ids: &'life1 [u32] ) -> Pin<Box<dyn Future<Output = Result<EntriesDTO>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn import_entries<'life0, 'async_trait>( &'life0 self, entries_dto: EntriesDTO ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§