pub struct Renderer { /* private fields */ }Expand description
A stateful renderer: owns a grid and applies frames to it.
Implementations§
Source§impl Renderer
impl Renderer
pub fn new( width: u16, height: u16, reg: GlyphRegistry, ) -> Result<Self, RenderError>
pub fn grid(&self) -> &Grid
pub fn grid_mut(&mut self) -> &mut Grid
pub fn apply(&mut self, frame: &Frame)
Sourcepub fn apply_with_damage(&mut self, frame: &Frame) -> Damage
pub fn apply_with_damage(&mut self, frame: &Frame) -> Damage
Apply a frame and return the damaged regions.
Damage is conservative and derived from the operations applied. It is suitable for incremental terminal backends that want to minimize redraw and flicker.
pub fn apply_op(&mut self, op: &RenderOp)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Renderer
impl RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin for Renderer
impl UnwindSafe for Renderer
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