pub struct CompressedFrame { /* private fields */ }Expand description
A delta-encoded frame snapshot.
Stores only the cells that changed from the previous frame. The first frame in a recording is always a full snapshot (all non-empty cells are stored as changes from an empty buffer).
Implementations§
Source§impl CompressedFrame
impl CompressedFrame
Sourcepub fn delta(current: &Buffer, previous: &Buffer) -> Self
pub fn delta(current: &Buffer, previous: &Buffer) -> Self
Create a delta-encoded snapshot from the previous buffer state.
Sourcepub fn apply_to(&self, buf: &mut Buffer)
pub fn apply_to(&self, buf: &mut Buffer)
Apply this frame’s changes to a buffer.
The buffer must have matching dimensions.
Sourcepub fn change_count(&self) -> usize
pub fn change_count(&self) -> usize
Number of changed cells in this frame.
Sourcepub fn memory_size(&self) -> usize
pub fn memory_size(&self) -> usize
Estimated memory size in bytes.
Sourcepub fn with_cursor(self, cursor: Option<(u16, u16)>) -> Self
pub fn with_cursor(self, cursor: Option<(u16, u16)>) -> Self
Set cursor position for this frame.
Trait Implementations§
Source§impl Clone for CompressedFrame
impl Clone for CompressedFrame
Source§fn clone(&self) -> CompressedFrame
fn clone(&self) -> CompressedFrame
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 Freeze for CompressedFrame
impl RefUnwindSafe for CompressedFrame
impl Send for CompressedFrame
impl Sync for CompressedFrame
impl Unpin for CompressedFrame
impl UnsafeUnpin for CompressedFrame
impl UnwindSafe for CompressedFrame
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