pub struct BufferSurface { /* private fields */ }Expand description
The stateful cell-buffer presenter: writes a buffer’s cells once, then per frame only the cells that changed, inside synchronized output. Indexed and truecolor cell colors travel through verbatim, which makes this the presenter cell-plane demos drive directly and the engine behind the blocks path. A fresh or resized buffer clears and repaints everything; an unchanged frame writes nothing.
Implementations§
Source§impl BufferSurface
impl BufferSurface
Sourcepub fn render_frame<W: Sink>(
&mut self,
out: &mut W,
next: Buffer,
) -> Result<usize>
pub fn render_frame<W: Sink>( &mut self, out: &mut W, next: Buffer, ) -> Result<usize>
Write one frame of next and return the bytes written. A fresh
or resized frame clears the screen and repaints every cell; a
later frame repaints only the changed cells, inside synchronized
output, with no clear that would erase the rest.
Trait Implementations§
Source§impl Debug for BufferSurface
impl Debug for BufferSurface
Auto Trait Implementations§
impl Forget for BufferSurface
impl Freeze for BufferSurface
impl Move for BufferSurface
impl RefUnwindSafe for BufferSurface
impl Send for BufferSurface
impl Sync for BufferSurface
impl Unpin for BufferSurface
impl UnsafeUnpin for BufferSurface
impl UnwindSafe for BufferSurface
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