Skip to main content

RecordFetcher

Trait RecordFetcher 

Source
pub trait RecordFetcher:
    Send
    + Sync
    + 'static {
    // Required method
    fn fetch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        topic: &'life1 str,
        partition: i32,
        offset: i64,
        isolation: IsolationLevel,
    ) -> Pin<Box<dyn Future<Output = Result<FetchBatch, StreamsClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn partitions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _topic: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<i32>, StreamsClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn fetch<'life0, 'life1, 'async_trait>( &'life0 self, topic: &'life1 str, partition: i32, offset: i64, isolation: IsolationLevel, ) -> Pin<Box<dyn Future<Output = Result<FetchBatch, StreamsClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch the records for (topic, partition) from offset, at the given isolation level. An empty batch means that nothing new is available.

Provided Methods§

Source

fn partitions<'life0, 'life1, 'async_trait>( &'life0 self, _topic: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<i32>, StreamsClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The partition indices of topic. The global consumer reads all of them to materialize a fully-replicated global store. Default: the single partition 0. The broker fetcher overrides the default from the metadata.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§