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.
Dropping it uncommitted Encoder::resets, so a frame that never reached the wire leaves the
encoder resynchronizing with a fresh snapshot rather than emitting deltas against a baseline no
consumer received. Note that this is a recovery, not a rollback: producing a delta payload
advances the group’s DEFLATE window, and that can’t be undone, so a snapshot is the only sound
way back. Forgetting to commit a frame that was written is therefore merely wasteful (one
redundant snapshot), never incorrect.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !Freeze for Pending<'a, T>
impl<'a, T> !UnwindSafe for Pending<'a, T>
impl<'a, T> RefUnwindSafe for Pending<'a, T>
impl<'a, T> Send for Pending<'a, T>
impl<'a, T> Sync 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