pub struct Batch<'a> { /* private fields */ }Expand description
Represents pending batch of messages between last observed producer position and the reader current position.
Should be used in conjunction with BatchIter to allow iteration.
Implementations§
Source§impl Batch<'_>
impl Batch<'_>
Sourcepub const fn remaining(&self) -> usize
pub const fn remaining(&self) -> usize
Return the number of remaining bytes to be consumed by this instance of batch.
Sourcepub fn receive_next(&mut self) -> Option<Result<Message>>
pub fn receive_next(&mut self) -> Option<Result<Message>>
Receive next message from the current batch or None if end of batch. This is a low level
method that will also return padding frames. Use into_iter() to work with more user-friendly
BatchIter.
Trait Implementations§
Source§impl<'a> IntoIterator for Batch<'a>
impl<'a> IntoIterator for Batch<'a>
Auto Trait Implementations§
impl<'a> Freeze for Batch<'a>
impl<'a> !RefUnwindSafe for Batch<'a>
impl<'a> !Send for Batch<'a>
impl<'a> !Sync for Batch<'a>
impl<'a> Unpin for Batch<'a>
impl<'a> !UnwindSafe for Batch<'a>
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