pub trait FetchFromDatabase: Send + Sync {
    // Required methods
    fn find<'life0, 'life1, 'async_trait, E>(
        &'life0 self,
        id: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Option<E>>> + Send + 'async_trait>>
       where E: 'async_trait + Entity<ConnectionType = KeystoreDatabaseConnection>,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn find_unique<'life0, 'async_trait, U>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<U>> + Send + 'async_trait>>
       where U: 'async_trait + UniqueEntity<ConnectionType = KeystoreDatabaseConnection>,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn find_all<'life0, 'async_trait, E>(
        &'life0 self,
        params: EntityFindParams,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Vec<E>>> + Send + 'async_trait>>
       where E: 'async_trait + Entity<ConnectionType = KeystoreDatabaseConnection>,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn find_many<'life0, 'life1, 'async_trait, E>(
        &'life0 self,
        ids: &'life1 [Vec<u8>],
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Vec<E>>> + Send + 'async_trait>>
       where E: 'async_trait + Entity<ConnectionType = KeystoreDatabaseConnection>,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn count<'life0, 'async_trait, E>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<usize>> + Send + 'async_trait>>
       where E: 'async_trait + Entity<ConnectionType = KeystoreDatabaseConnection>,
             Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Interface to fetch from the database either from the connection directly or through a transaaction

Required Methods§

source

fn find<'life0, 'life1, 'async_trait, E>( &'life0 self, id: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Option<E>>> + Send + 'async_trait>>
where E: 'async_trait + Entity<ConnectionType = KeystoreDatabaseConnection>, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn find_unique<'life0, 'async_trait, U>( &'life0 self, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<U>> + Send + 'async_trait>>
where U: 'async_trait + UniqueEntity<ConnectionType = KeystoreDatabaseConnection>, Self: 'async_trait, 'life0: 'async_trait,

source

fn find_all<'life0, 'async_trait, E>( &'life0 self, params: EntityFindParams, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Vec<E>>> + Send + 'async_trait>>
where E: 'async_trait + Entity<ConnectionType = KeystoreDatabaseConnection>, Self: 'async_trait, 'life0: 'async_trait,

source

fn find_many<'life0, 'life1, 'async_trait, E>( &'life0 self, ids: &'life1 [Vec<u8>], ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Vec<E>>> + Send + 'async_trait>>
where E: 'async_trait + Entity<ConnectionType = KeystoreDatabaseConnection>, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn count<'life0, 'async_trait, E>( &'life0 self, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<usize>> + Send + 'async_trait>>
where E: 'async_trait + Entity<ConnectionType = KeystoreDatabaseConnection>, Self: 'async_trait, 'life0: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§