pub struct DeltaBuffer<D: Lattice> { /* private fields */ }Expand description
Buffer for outgoing deltas with grouping support
Implementations§
Source§impl<D: Lattice> DeltaBuffer<D>
impl<D: Lattice> DeltaBuffer<D>
pub fn new(max_buffer_size: usize) -> Self
Sourcepub fn deltas_since(&self, acked_seq: SeqNo) -> Vec<&TaggedDelta<D>>
pub fn deltas_since(&self, acked_seq: SeqNo) -> Vec<&TaggedDelta<D>>
Get deltas for sending to a peer that has acked up to acked_seq
Sourcepub fn delta_group_since(&self, acked_seq: SeqNo) -> Option<D>
pub fn delta_group_since(&self, acked_seq: SeqNo) -> Option<D>
Create a delta-group (joined deltas) for a peer
Sourcepub fn ack(&mut self, acked_seq: SeqNo) -> usize
pub fn ack(&mut self, acked_seq: SeqNo) -> usize
Acknowledge that a peer has received up to seq
Deltas before this can be GC’d if all peers have acked
Sourcepub fn current_seq(&self) -> SeqNo
pub fn current_seq(&self) -> SeqNo
Current sequence number
Trait Implementations§
Source§impl<D: Clone + Lattice> Clone for DeltaBuffer<D>
impl<D: Clone + Lattice> Clone for DeltaBuffer<D>
Source§fn clone(&self) -> DeltaBuffer<D>
fn clone(&self) -> DeltaBuffer<D>
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 moreAuto Trait Implementations§
impl<D> Freeze for DeltaBuffer<D>
impl<D> RefUnwindSafe for DeltaBuffer<D>where
D: RefUnwindSafe,
impl<D> Send for DeltaBuffer<D>where
D: Send,
impl<D> Sync for DeltaBuffer<D>where
D: Sync,
impl<D> Unpin for DeltaBuffer<D>where
D: Unpin,
impl<D> UnwindSafe for DeltaBuffer<D>where
D: UnwindSafe,
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