pub struct Pending<'a, T> { /* private fields */ }Expand description
An encoded frame the caller has not yet acknowledged writing.
Returned by Encoder::update. Read payload and
keyframe through the Deref to Encoded, write the
frame, then commit.
The frame’s value is staged until commit, so dropping it uncommitted leaves
Encoder::value at the last value that reached the wire, and Encoder::resets so the next
frame is a fresh snapshot rather than a delta against a group no consumer received. The group
state is a recovery, not a rollback: a consumer may hold a group the dropped frame was meant
for, so a snapshot is the only sound way back. Forgetting to commit
a frame that was written therefore costs one redundant snapshot and leaves the value a step
behind, but never corrupts the stream.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !Freeze for Pending<'a, T>
impl<'a, T> !RefUnwindSafe for Pending<'a, T>
impl<'a, T> !Sync for Pending<'a, T>
impl<'a, T> !UnwindSafe for Pending<'a, T>
impl<'a, T> Send for Pending<'a, T>
impl<'a, T> Unpin for Pending<'a, T>
impl<'a, T> UnsafeUnpin for Pending<'a, T>
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