pub struct AsciiControlCodes;
Expand description

The set of ASCII values that are non-printable characters and require special handling by a terminal emulator.

Implementations§

source§

impl AsciiControlCodes

source

pub const Bell: u8 = 7u8

(BEL) Plays a terminal bell or beep.

Ctrl + G, or '\a'.

source

pub const Backspace: u8 = 8u8

(BS) Moves the cursor backwards by one unit/character, but does not remove it. Note that this is different than the typical behavior of the “Backspace” key on a keyboard.

Ctrl + H, or '\b'.

source

pub const Tab: u8 = 9u8

(HT) Inserts a horizontal tab.

Ctrl + I, or '\t'.

source

pub const LineFeed: u8 = 10u8

(LF) Moves the cursor to the next line, i.e., Line feed, or new line / newline.

Ctrl + J, or '\n'.

source

pub const VerticalTab: u8 = 11u8

(VT) Inserts a vertical tab.

Ctrl + K, or '\v'.

source

pub const PageBreak: u8 = 12u8

(FF) Inserts a page break (form feed) to move the cursor/prompt to the beginning of a new page (screen).

Ctrl + L, or '\f'.

source

pub const CarriageReturn: u8 = 13u8

(CR) Moves the cursor to the beginning of the line, i.e., carriage return.

Ctrl + M, or '\r'.

source

pub const Escape: u8 = 27u8

(ESC) The escape character.

ESC, or '\e'.

source

pub const BackwardsDelete: u8 = 127u8

(DEL) Backwards-deletes the character before (to the left of) the cursor. This is equivalent to what the Backspace key on a keyboard typically does.

DEL.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.