use std::error::Error;
pub trait OperationStore<T, ID, C> {
type Error: Error;
fn insert_operation(
&self,
id: &ID,
operation: &T,
collection_id: &C,
) -> impl Future<Output = Result<bool, Self::Error>>;
fn get_operation(&self, id: &ID) -> impl Future<Output = Result<Option<T>, Self::Error>>;
fn get_operation_tx(&self, id: &ID) -> impl Future<Output = Result<Option<T>, Self::Error>>;
fn has_operation(&self, id: &ID) -> impl Future<Output = Result<bool, Self::Error>>;
fn has_operation_tx(&self, id: &ID) -> impl Future<Output = Result<bool, Self::Error>>;
fn delete_operation(&self, id: &ID) -> impl Future<Output = Result<bool, Self::Error>>;
fn delete_operation_payload(&self, id: &ID) -> impl Future<Output = Result<bool, Self::Error>>;
}