pub struct ChangeBatch { /* private fields */ }Expand description
One durable batch from an anchored backend change stream.
Implementations§
Source§impl ChangeBatch
impl ChangeBatch
Sourcepub const fn new(
changes: Vec<CloudChange>,
next_cursor: ChangeCursor,
has_more: bool,
) -> Self
pub const fn new( changes: Vec<CloudChange>, next_cursor: ChangeCursor, has_more: bool, ) -> Self
Creates a change batch. The cursor becomes active only after effects are durably replayable.
Sourcepub fn changes(&self) -> &[CloudChange]
pub fn changes(&self) -> &[CloudChange]
Returns changes in backend-defined application order.
Sourcepub const fn next_cursor(&self) -> &ChangeCursor
pub const fn next_cursor(&self) -> &ChangeCursor
Returns the checkpoint following this batch.
Sourcepub fn into_parts(self) -> (Vec<CloudChange>, ChangeCursor, bool)
pub fn into_parts(self) -> (Vec<CloudChange>, ChangeCursor, bool)
Consumes the batch and returns its changes, next cursor, and continuation flag.
Trait Implementations§
Source§impl Clone for ChangeBatch
impl Clone for ChangeBatch
Source§fn clone(&self) -> ChangeBatch
fn clone(&self) -> ChangeBatch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChangeBatch
impl Debug for ChangeBatch
Source§impl PartialEq for ChangeBatch
impl PartialEq for ChangeBatch
impl Eq for ChangeBatch
impl StructuralPartialEq for ChangeBatch
Auto Trait Implementations§
impl Freeze for ChangeBatch
impl RefUnwindSafe for ChangeBatch
impl Send for ChangeBatch
impl Sync for ChangeBatch
impl Unpin for ChangeBatch
impl UnwindSafe for ChangeBatch
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