pub struct JournalReader { /* private fields */ }Expand description
A reader for consuming settled entries from the journal.
Reader WON’T advance the shared consumed boundary until commit() is
called. Entries are fetched from RocksDB into an internal buffer on each
read call.
Implementations§
Source§impl JournalReader
impl JournalReader
Sourcepub fn available(&self) -> usize
pub fn available(&self) -> usize
Returns the number of available entries that have been written but not yet consumed by this reader.
Sourcepub async fn wait_at_least(&mut self, min: usize) -> Result<(), Error>
pub async fn wait_at_least(&mut self, min: usize) -> Result<(), Error>
Wait until at least min entries are available.
Trait Implementations§
Source§impl Debug for JournalReader
impl Debug for JournalReader
Auto Trait Implementations§
impl Freeze for JournalReader
impl RefUnwindSafe for JournalReader
impl Send for JournalReader
impl Sync for JournalReader
impl Unpin for JournalReader
impl UnsafeUnpin for JournalReader
impl UnwindSafe for JournalReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more