pub trait Datasource<T: Send>: Sync + Send {
// Required methods
fn start_data_retrieval<'life0, 'async_trait>(
&'life0 self,
task: Task,
data_sender: DataSender<T>,
) -> Pin<Box<dyn Future<Output = Result<JoinHandle<Result<(), Error>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_live_task_starting_checkpoint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_genesis_height(&self) -> u64;
fn metric_provider(&self) -> &dyn IndexerMetricProvider;
// Provided method
fn start_ingestion_task<'life0, 'async_trait, M, P, R>(
&'life0 self,
task: Task,
storage: P,
data_mapper: M,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where M: DataMapper<T, R> + 'async_trait,
P: Persistent<R> + 'async_trait,
R: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait { ... }
}
Required Methods§
fn start_data_retrieval<'life0, 'async_trait>(
&'life0 self,
task: Task,
data_sender: DataSender<T>,
) -> Pin<Box<dyn Future<Output = Result<JoinHandle<Result<(), Error>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_live_task_starting_checkpoint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_genesis_height(&self) -> u64
fn metric_provider(&self) -> &dyn IndexerMetricProvider
Provided Methods§
fn start_ingestion_task<'life0, 'async_trait, M, P, R>(
&'life0 self,
task: Task,
storage: P,
data_mapper: M,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
M: DataMapper<T, R> + 'async_trait,
P: Persistent<R> + 'async_trait,
R: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.