pub trait OffsetStore: Send + Sync {
// Required methods
fn store_offset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
offset_info: &'life3 OffsetInfo,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn get_offset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
) -> Pin<Box<dyn Future<Output = StateResult<Option<OffsetInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_all_offsets<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = StateResult<HashMap<TopicPartition, OffsetInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_offset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn clear_offsets<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for offset storage backends
Implementations can store offsets in memory, state backends, external systems, or Kafka itself.
Required Methods§
Sourcefn store_offset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
offset_info: &'life3 OffsetInfo,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn store_offset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
offset_info: &'life3 OffsetInfo,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn get_offset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
) -> Pin<Box<dyn Future<Output = StateResult<Option<OffsetInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_offset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
) -> Pin<Box<dyn Future<Output = StateResult<Option<OffsetInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn get_all_offsets<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = StateResult<HashMap<TopicPartition, OffsetInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_all_offsets<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = StateResult<HashMap<TopicPartition, OffsetInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn delete_offset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_offset<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
topic_partition: &'life2 TopicPartition,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn clear_offsets<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_offsets<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = StateResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".