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;
}