use async_trait::async_trait;
use crate::document::DocumentId;
use crate::hash::Hash;
use crate::operation::traits::AsVerifiedOperation;
use crate::storage_provider::traits::{
AsStorageLog, EntryStore, EntryWithOperation, LogStore, OperationStore,
};
use crate::storage_provider::utils::Result;
#[async_trait]
pub trait StorageProvider:
EntryStore<Self::Entry> + LogStore<Self::StorageLog> + OperationStore<Self::Operation>
{
type Entry: EntryWithOperation;
type StorageLog: AsStorageLog;
type Operation: AsVerifiedOperation;
async fn get_document_by_entry(&self, entry_hash: &Hash) -> Result<Option<DocumentId>>;
}