Skip to main content

CellBackend

Struct CellBackend 

Source
pub struct CellBackend { /* private fields */ }
Expand description

Styled text cells. Works everywhere, so every feature must work here.

Trait Implementations§

Source§

impl Backend for CellBackend

Source§

fn scroll( &mut self, _from: &Grid, to: &Grid, area: Rect, rows: i32, out: &mut dyn Write, ) -> Result<()>

Has the terminal shift the band of rows the scrolled area spans, as vim and Claude Code do, so only the lines that come into view and the columns that stay put (rail, sidebar, minimap) are sent after it. Rewriting every row instead is what shows as a scan over a slow link, in tmux especially. A whole-width region works in every terminal, which left and right margins don’t. The present that follows closes the synchronized update this opens, so the shift and the repair land as one frame.

Source§

fn present(&mut self, grid: &Grid, out: &mut dyn Write) -> Result<()>

Source§

fn invalidate(&mut self)

Forgets what the terminal shows, so the next present redraws everything.
Source§

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<()>

Moves a scroll under way one step on.
Source§

fn settle(&mut self)

Ends a scroll under way, for the next present to show the page as it is.
Source§

impl Default for CellBackend

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.