AnsiSequences

Struct AnsiSequences 

Source
pub struct AnsiSequences;
Expand description

ANSI escape sequence helpers.

Implementations§

Source§

impl AnsiSequences

Source

pub const CURSOR_UP: &'static [u8] = b"\x1b[A"

Cursor up.

Source

pub const CURSOR_DOWN: &'static [u8] = b"\x1b[B"

Cursor down.

Source

pub const CURSOR_RIGHT: &'static [u8] = b"\x1b[C"

Cursor right.

Source

pub const CURSOR_LEFT: &'static [u8] = b"\x1b[D"

Cursor left.

Source

pub const HOME: &'static [u8] = b"\x1b[H"

Home key.

Source

pub const END: &'static [u8] = b"\x1b[F"

End key.

Source

pub const PAGE_UP: &'static [u8] = b"\x1b[5~"

Page up.

Source

pub const PAGE_DOWN: &'static [u8] = b"\x1b[6~"

Page down.

Source

pub const INSERT: &'static [u8] = b"\x1b[2~"

Insert key.

Source

pub const DELETE: &'static [u8] = b"\x1b[3~"

Delete key.

Source

pub const F1: &'static [u8] = b"\x1bOP"

F1 key.

Source

pub const F2: &'static [u8] = b"\x1bOQ"

F2 key.

Source

pub const F3: &'static [u8] = b"\x1bOR"

F3 key.

Source

pub const F4: &'static [u8] = b"\x1bOS"

F4 key.

Source

pub const F5: &'static [u8] = b"\x1b[15~"

F5 key.

Source

pub const F6: &'static [u8] = b"\x1b[17~"

F6 key.

Source

pub const F7: &'static [u8] = b"\x1b[18~"

F7 key.

Source

pub const F8: &'static [u8] = b"\x1b[19~"

F8 key.

Source

pub const F9: &'static [u8] = b"\x1b[20~"

F9 key.

Source

pub const F10: &'static [u8] = b"\x1b[21~"

F10 key.

Source

pub const F11: &'static [u8] = b"\x1b[23~"

F11 key.

Source

pub const F12: &'static [u8] = b"\x1b[24~"

F12 key.

Source

pub fn cursor_move(rows: i32, cols: i32) -> Vec<u8>

Generate cursor movement sequence.

Source

pub fn cursor_position(row: u32, col: u32) -> Vec<u8>

Generate cursor position sequence.

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V