use async_trait::async_trait;
use ethers_providers::JsonRpcClient;
use crate::Collector;
use eventify_primitives::{Auth, Storage};
#[async_trait]
pub trait Runner {
type Error;
async fn run<T: JsonRpcClient + Clone + Send + Sync, U: Storage + Auth + Clone + Send + Sync>(
processor: Collector<T, U>,
) -> Result<(), Self::Error>;
#[cfg(feature = "multi-thread")]
async fn run_par<
T: JsonRpcClient + Clone + Send + Sync,
U: Storage + Auth + Clone + Send + Sync,
>(
processor: Collector<T, U>,
) -> Result<(), Self::Error>;
}