Skip to main content

CursedRenderer

Struct CursedRenderer 

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

CursedRenderer manages high-performance declarative View rendering.

Implementations§

Source§

impl CursedRenderer

Source

pub fn set_logger(&mut self, logger: Option<Box<dyn Logger + Send + Sync>>)

SetLogger sets the logger for the renderer.

Source

pub fn set_optimizations( &mut self, hard_tabs: bool, backspace: bool, map_nl: bool, )

SetOptimizations sets the cursor movement optimizations.

Source

pub fn set_color_profile(&mut self, p: Profile)

SetColorProfile sets the color profile of the renderer.

Source

pub fn set_syncd_updates(&mut self, syncd: bool)

SetSyncdUpdates sets whether synchronized output mode is used.

Source

pub fn set_width_method(&mut self, method: WidthMethod)

SetWidthMethod sets the width method of the renderer.

Source

pub fn set_scroll_optim(&mut self, v: bool)

SetScrollOptim sets whether to use hard scroll optimizations.

Trait Implementations§

Source§

impl Renderer for CursedRenderer

Source§

fn set_optimizations(&mut self, hard_tabs: bool, backspace: bool, map_nl: bool)

Sets the cursor movement optimizations (hard tabs, backspace, newline mapping).
Source§

fn set_color_profile(&mut self, p: Profile)

Sets the terminal color profile used for downsampling colors.
Source§

fn start(&mut self)

Starts the renderer.
Source§

fn close(&mut self) -> Result<(), Box<dyn Error>>

Closes the renderer and flushes any remaining data.
Source§

fn render(&mut self, view: View)

Renders a declarative View frame.
Source§

fn flush(&mut self, closing: bool) -> Result<(), Box<dyn Error>>

Flushes renderer output buffer to terminal stdout.
Source§

fn reset(&mut self)

Resets renderer to initial state.
Source§

fn insert_above(&mut self, str_: String) -> Result<(), Box<dyn Error>>

Inserts unmanaged lines above the TUI renderer.
Source§

fn resize(&mut self, width: usize, height: usize)

Resize notification.
Source§

fn clear_screen(&mut self)

Clears terminal screen.
Source§

fn write_string(&mut self, s: &str) -> Result<usize, Box<dyn Error>>

Write raw string to output.
Source§

fn on_mouse(&mut self, m: MouseMsg) -> Cmd

Mouse event interceptor.

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.