State

Struct State 

Source
pub struct State {
Show 27 fields pub x: usize, pub y: usize, pub save_x: usize, pub save_y: usize, pub w: usize, pub h: usize, pub top_margin: usize, pub bottom_margin: usize, pub g0: char, pub g1: char, pub foreground: Color, pub background: Color, pub foreground_default: Color, pub background_default: Color, pub bold: bool, pub inverted: bool, pub italic: bool, pub underlined: bool, pub strikethrough: bool, pub cursor: bool, pub redraw: bool, pub origin: bool, pub autowrap: bool, pub mouse_vt200: bool, pub mouse_btn: bool, pub mouse_sgr: bool, pub mouse_rxvt: bool,
}

Fields§

§x: usize§y: usize§save_x: usize§save_y: usize§w: usize§h: usize§top_margin: usize§bottom_margin: usize§g0: char§g1: char§foreground: Color§background: Color§foreground_default: Color§background_default: Color§bold: bool§inverted: bool§italic: bool§underlined: bool§strikethrough: bool§cursor: bool§redraw: bool§origin: bool§autowrap: bool§mouse_vt200: bool§mouse_btn: bool§mouse_sgr: bool§mouse_rxvt: bool

Implementations§

Source§

impl State

Source

pub fn new(w: usize, h: usize) -> State

Source

pub fn print<F: FnMut(Event<'_>)>(&mut self, c: char, callback: &mut F)

Source

pub fn execute<F: FnMut(Event<'_>)>(&mut self, c: char, _callback: &mut F)

Source

pub fn csi<F: FnMut(Event<'_>)>( &mut self, c: char, params: &[i64], _intermediates: &[u8], callback: &mut F, )

Source

pub fn esc<F: FnMut(Event<'_>)>( &mut self, c: char, _params: &[i64], intermediates: &[u8], callback: &mut F, )

Source

pub fn osc<F: FnMut(Event<'_>)>(&mut self, params: &[&[u8]], callback: &mut F)

Auto Trait Implementations§

§

impl Freeze for State

§

impl RefUnwindSafe for State

§

impl Send for State

§

impl Sync for State

§

impl Unpin for State

§

impl UnwindSafe for State

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.