pub trait TransactionCache {
    type Error: Debug + Send;

    // Required methods
    fn get_entities<'life0, 'async_trait, O, T, TransactionId>(
        &'life0 self,
        transaction_id: TransactionId
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<T::Id, TxCacheEntity<T, T::Id>>, Self::Error>> + Send + 'async_trait>>
       where TransactionId: 'async_trait + Send + Serialize,
             O: ?Sized + ObjectType,
             T: DeserializeOwned + Identifiable + Send,
             T::Id: Clone,
             'life0: 'async_trait;
    fn get_by_ids<'life0, 'life1, 'async_trait, O, T, TransactionId>(
        &'life0 self,
        transaction_id: TransactionId,
        ids: &'life1 [T::Id]
    ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Self::Error>> + Send + 'async_trait>>
       where TransactionId: 'async_trait + Send + Serialize,
             O: ?Sized + ObjectType,
             T: DeserializeOwned + Identifiable + Send,
             T::Id: Clone,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn upsert<'life0, 'life1, 'async_trait, O, T, TransactionId>(
        &'life0 self,
        transaction_id: TransactionId,
        entities: impl IntoIterator<Item = impl Borrow<T> + Send> + Send + 'life1
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where TransactionId: 'async_trait + Clone + Send + Serialize,
             O: ?Sized + ObjectType,
             T: Identifiable + Serialize,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn mark_deleted<'life0, 'life1, 'async_trait, O, T, TransactionId>(
        &'life0 self,
        transaction_id: TransactionId,
        entities: impl IntoIterator<Item = impl Borrow<T> + Send> + Send + 'life1
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where TransactionId: 'async_trait + Clone + Send + Serialize,
             O: ?Sized + ObjectType,
             T: Identifiable + Serialize,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Associated Types§

Required Methods§

source

fn get_entities<'life0, 'async_trait, O, T, TransactionId>( &'life0 self, transaction_id: TransactionId ) -> Pin<Box<dyn Future<Output = Result<HashMap<T::Id, TxCacheEntity<T, T::Id>>, Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Send + Serialize, O: ?Sized + ObjectType, T: DeserializeOwned + Identifiable + Send, T::Id: Clone, 'life0: 'async_trait,

source

fn get_by_ids<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, transaction_id: TransactionId, ids: &'life1 [T::Id] ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Send + Serialize, O: ?Sized + ObjectType, T: DeserializeOwned + Identifiable + Send, T::Id: Clone, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn upsert<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, transaction_id: TransactionId, entities: impl IntoIterator<Item = impl Borrow<T> + Send> + Send + 'life1 ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Clone + Send + Serialize, O: ?Sized + ObjectType, T: Identifiable + Serialize, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn mark_deleted<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, transaction_id: TransactionId, entities: impl IntoIterator<Item = impl Borrow<T> + Send> + Send + 'life1 ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Clone + Send + Serialize, O: ?Sized + ObjectType, T: Identifiable + Serialize, 'life0: 'async_trait, 'life1: 'async_trait,

Implementations on Foreign Types§

source§

impl<TC: TransactionCache> TransactionCache for &TC

§

type Error = <TC as TransactionCache>::Error

source§

fn get_entities<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, transaction_id: TransactionId ) -> Pin<Box<dyn Future<Output = Result<HashMap<T::Id, TxCacheEntity<T, T::Id>>, Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Send + Serialize, O: ?Sized + ObjectType, T: DeserializeOwned + Identifiable + Send, T::Id: Clone, 'life0: 'async_trait,

source§

fn get_by_ids<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, transaction_id: TransactionId, ids: &'life1 [T::Id] ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Send + Serialize, O: ?Sized + ObjectType, T: DeserializeOwned + Identifiable + Send, T::Id: Clone, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn upsert<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, transaction_id: TransactionId, entities: impl IntoIterator<Item = impl Borrow<T> + Send> + Send + 'life1 ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Clone + Send + Serialize, O: ?Sized + ObjectType, T: Identifiable + Serialize, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn mark_deleted<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, transaction_id: TransactionId, entities: impl IntoIterator<Item = impl Borrow<T> + Send> + Send + 'life1 ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Clone + Send + Serialize, O: ?Sized + ObjectType, T: Identifiable + Serialize, 'life0: 'async_trait, 'life1: 'async_trait,

source§

impl TransactionCache for ()

§

type Error = Infallible

source§

fn get_entities<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, _: TransactionId ) -> Pin<Box<dyn Future<Output = Result<HashMap<T::Id, TxCacheEntity<T, T::Id>>, Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Send + Serialize, O: ?Sized + ObjectType, T: DeserializeOwned + Identifiable + Send, T::Id: Clone, 'life0: 'async_trait,

source§

fn get_by_ids<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, _: TransactionId, _: &'life1 [T::Id] ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Send + Serialize, O: ?Sized + ObjectType, T: DeserializeOwned + Identifiable + Send, T::Id: Clone, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn upsert<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, _: TransactionId, _: impl IntoIterator<Item = impl Borrow<T> + Send> + Send + 'life1 ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Send + Serialize, O: ?Sized + ObjectType, T: Identifiable + Serialize, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn mark_deleted<'life0, 'life1, 'async_trait, O, T, TransactionId>( &'life0 self, _: TransactionId, _: impl IntoIterator<Item = impl Borrow<T> + Send> + Send + 'life1 ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where TransactionId: 'async_trait + Send + Serialize, O: ?Sized + ObjectType, T: Identifiable + Serialize, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§