framework_cqrs_lib::cqrs::core::daos

Trait ReadOnlyDAO

Source
pub trait ReadOnlyDAO<DBO, ID> {
    // Required methods
    fn fetch_one<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 ID,
    ) -> Pin<Box<dyn Future<Output = ResultErr<Option<DBO>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn fetch_all<'life0, 'async_trait>(
        &'life0 self,
        query: Query,
    ) -> Pin<Box<dyn Future<Output = ResultErr<Vec<DBO>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn fetch_one<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 ID, ) -> Pin<Box<dyn Future<Output = ResultErr<Option<DBO>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn fetch_all<'life0, 'async_trait>( &'life0 self, query: Query, ) -> Pin<Box<dyn Future<Output = ResultErr<Vec<DBO>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<DBO> ReadOnlyDAO<DBO, String> for MongoDAO<DBO>
where DBO: DeserializeOwned + Send + Sync,