pub struct PixelBackend<R> { /* private fields */ }Expand description
Renders each row once as a tile, keeps it in the terminal’s image store, and moves it by reference, so only new content crosses the wire.
Implementations§
Source§impl<R: Rasterizer> PixelBackend<R>
impl<R: Rasterizer> PixelBackend<R>
pub fn new(rasterizer: R, placement: Placement, quota: usize) -> Self
Sourcepub fn with_bleed(self, bleed: Bleed) -> Self
pub fn with_bleed(self, bleed: Bleed) -> Self
Only direct placement can leave the text area: placeholders are cells.
pub fn with_smooth(self, smooth: Smooth) -> Self
pub fn tile_count(&self) -> usize
pub fn used_bytes(&self) -> usize
Trait Implementations§
Source§impl<R: Rasterizer> Backend for PixelBackend<R>
impl<R: Rasterizer> Backend for PixelBackend<R>
fn present(&mut self, grid: &Grid, out: &mut dyn Write) -> Result<()>
Source§fn scroll(
&mut self,
from: &Grid,
to: &Grid,
area: Rect,
rows: i32,
out: &mut dyn Write,
) -> Result<()>
fn scroll( &mut self, from: &Grid, to: &Grid, area: Rect, rows: i32, out: &mut dyn Write, ) -> Result<()>
Starts moving
area from one grid to the other, rows lines further down the content,
or up if negative, and carries on from where it is if it’s already moving. The moving
happens in glide. Tiers that can’t move
anything by less than a cell do nothing, and the page just jumps.Source§fn gliding(&self) -> Option<Duration>
fn gliding(&self) -> Option<Duration>
How often a scroll under way wants to move, if there is one.
Source§fn glide(&mut self, now: Instant, out: &mut dyn Write) -> Result<()>
fn glide(&mut self, now: Instant, out: &mut dyn Write) -> Result<()>
Moves a scroll under way one step on.
Source§fn invalidate(&mut self)
fn invalidate(&mut self)
Forgets what the terminal shows, so the next present redraws everything.
Auto Trait Implementations§
impl<R> Freeze for PixelBackend<R>where
R: Freeze,
impl<R> RefUnwindSafe for PixelBackend<R>where
R: RefUnwindSafe,
impl<R> Send for PixelBackend<R>where
R: Send,
impl<R> Sync for PixelBackend<R>where
R: Sync,
impl<R> Unpin for PixelBackend<R>where
R: Unpin,
impl<R> UnsafeUnpin for PixelBackend<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for PixelBackend<R>where
R: 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