pub(crate) trait DatabentoFeed: Send + Sync {
// Required method
fn next_record<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<FeedRecord>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Abstraction over a Databento live-or-historical feed, narrowed to the two calls the provider needs: pull the next record, or stop.
Async because the real implementation wraps databento::live::Client
which is async; a synchronous Iterator would force us to block inside
the provider task.
Required Methods§
Sourcefn next_record<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<FeedRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_record<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<FeedRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the next record from the feed, or None once the feed has
ended and will never produce another record. Transient errors are
returned as Some(FeedRecord::Error(..)) — only a terminal state
yields None.