Skip to main content

OffsetStore

Trait OffsetStore 

Source
pub trait OffsetStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn committed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        topic: &'life1 str,
        partition: i32,
    ) -> Pin<Box<dyn Future<Output = Result<Option<i64>, StreamsClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn earliest<'life0, 'life1, 'async_trait>(
        &'life0 self,
        topic: &'life1 str,
        partition: i32,
    ) -> Pin<Box<dyn Future<Output = Result<i64, StreamsClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn latest<'life0, 'life1, 'async_trait>(
        &'life0 self,
        topic: &'life1 str,
        partition: i32,
    ) -> Pin<Box<dyn Future<Output = Result<i64, StreamsClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn commit<'life0, 'life1, 'async_trait>(
        &'life0 self,
        offsets: &'life1 [(String, i32, i64)],
    ) -> Pin<Box<dyn Future<Output = Result<(), StreamsClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

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

The committed offset for (topic, partition), or None when no commit happened.

Source

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

The earliest available offset, which matches auto.offset.reset = earliest.

Source

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

The latest available offset, that is the log-end offset.

Source

fn commit<'life0, 'life1, 'async_trait>( &'life0 self, offsets: &'life1 [(String, i32, i64)], ) -> Pin<Box<dyn Future<Output = Result<(), StreamsClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Commit (topic, partition, offset) triples for the streams group.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§