Skip to main content

DynLogReader

Trait DynLogReader 

Source
pub trait DynLogReader: Send {
    // Required methods
    fn dyn_start_from<'life0, 'async_trait>(
        &'life0 mut self,
        start_offset: Option<u64>,
    ) -> Pin<Box<dyn Future<Output = LogStoreResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn dyn_next_item<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = LogStoreResult<(u64, LogStoreReadItem)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn dyn_truncate(&mut self, offset: TruncateOffset) -> LogStoreResult<()>;
}

Required Methods§

Source

fn dyn_start_from<'life0, 'async_trait>( &'life0 mut self, start_offset: Option<u64>, ) -> Pin<Box<dyn Future<Output = LogStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn dyn_next_item<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = LogStoreResult<(u64, LogStoreReadItem)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn dyn_truncate(&mut self, offset: TruncateOffset) -> LogStoreResult<()>

Trait Implementations§

Source§

impl SinkLogReader for &mut dyn DynLogReader

Source§

fn start_from( &mut self, start_offset: Option<u64>, ) -> impl Future<Output = LogStoreResult<()>> + Send + '_

Source§

fn next_item( &mut self, ) -> impl Future<Output = LogStoreResult<(u64, LogStoreReadItem)>> + Send + '_

Emit the next item. Read more
Source§

fn truncate(&mut self, offset: TruncateOffset) -> LogStoreResult<()>

Mark that all items emitted so far have been consumed and it is safe to truncate the log from the current offset.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§