pub trait DocumentStore<T, M>where
    T: Send + Sync,
    M: Serialize + DeserializeOwned + Send + Sync,{
    type Error: Debug + Error + DocumentStoreError;

    // Required methods
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 T
    ) -> Pin<Box<dyn Future<Output = Result<Option<Document<M>>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn next_id<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<T, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn insert<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        documents: &'life1 HashMap<T, Document<M>>
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Associated Types§

Required Methods§

source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 T ) -> Pin<Box<dyn Future<Output = Result<Option<Document<M>>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

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

source

fn insert<'life0, 'life1, 'async_trait>( &'life0 mut self, documents: &'life1 HashMap<T, Document<M>> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§