EscapeSequence

Enum EscapeSequence 

Source
pub enum EscapeSequence {
Show 26 variants CursorUpSequence(u32), CursorDownSequence(u32), CursorForwardSequence(u32), CursorBackSequence(u32), CursorNextLineSequence(u32), CursorPreviousLineSequence(u32), CursorHorizontalAbsoluteSequence(u32), CursorPositionSequence(u32, u32), EraseScreenAfterCursorSequence, EraseScreenBeforeCursorSequence, EraseScreenSequence, EraseScreenAndScrollbackSequence, EraseLineAfterCursorSequence, EraseLineBeforeCursorSequence, EraseLineSequence, ScrollUpSequence(u32), ScrollDownSequence(u32), HorizontalVerticalPositionSequence(u32, u32), SelectGraphicRenditionSequence(Vec<SelectGraphicRenditionParameter>), AUXPortOnSequence, AUXPortOffSequence, DeviceStatusReportSequence, SaveCursorPositionSequence, RestoreCursorPositionSequence, ResetColorsSequence, ResetAttributesSequence,
}

Variants§

§

CursorUpSequence(u32)

§

CursorDownSequence(u32)

§

CursorForwardSequence(u32)

§

CursorBackSequence(u32)

§

CursorNextLineSequence(u32)

§

CursorPreviousLineSequence(u32)

§

CursorHorizontalAbsoluteSequence(u32)

§

CursorPositionSequence(u32, u32)

§

EraseScreenAfterCursorSequence

§

EraseScreenBeforeCursorSequence

§

EraseScreenSequence

§

EraseScreenAndScrollbackSequence

§

EraseLineAfterCursorSequence

§

EraseLineBeforeCursorSequence

§

EraseLineSequence

§

ScrollUpSequence(u32)

§

ScrollDownSequence(u32)

§

HorizontalVerticalPositionSequence(u32, u32)

§

SelectGraphicRenditionSequence(Vec<SelectGraphicRenditionParameter>)

§

AUXPortOnSequence

§

AUXPortOffSequence

§

DeviceStatusReportSequence

§

SaveCursorPositionSequence

§

RestoreCursorPositionSequence

§

ResetColorsSequence

§

ResetAttributesSequence

Implementations§

Source§

impl EscapeSequence

Source

pub fn to_string(self) -> String

Examples found in repository?
examples/example.rs (line 42)
3fn main() {
4    let params1: Vec<SelectGraphicRenditionParameter> = vec![
5        //SelectGraphicRenditionParameter::SetForegroundColorParameter(ForegroundColor::BlueForeground),
6        SelectGraphicRenditionParameter::SetForegroundColorParameter(
7            ForegroundColor::ForegroundColor(
8                Color::Color256(44)
9            )
10        ),
11        SelectGraphicRenditionParameter::SetBrightForegroundColorParameter(
12            BrightForegroundColor::BrightBlueForeground
13        ),
14        SelectGraphicRenditionParameter::SetBackgroundColorParameter(
15            BackgroundColor::BackgroundColor(
16                Color::RGB(255, 0, 127)
17            )
18        ),
19        SelectGraphicRenditionParameter::BoldParameter,
20        SelectGraphicRenditionParameter::ItalicParameter,
21    ];
22    let params2: Vec<SelectGraphicRenditionParameter> = vec![
23        //SelectGraphicRenditionParameter::SetForegroundColorParameter(ForegroundColor::BlueForeground),
24        SelectGraphicRenditionParameter::SetForegroundColorParameter(
25            ForegroundColor::ForegroundColor(
26                Color::Color256(44)
27            )
28        ),
29        SelectGraphicRenditionParameter::SetBrightForegroundColorParameter(
30            BrightForegroundColor::BrightBlueForeground
31        ),
32        SelectGraphicRenditionParameter::SetBackgroundColorParameter(
33            BackgroundColor::BackgroundColor(
34                Color::RGB(255, 0, 127)
35            )
36        ),
37        SelectGraphicRenditionParameter::BoldParameter,
38        SelectGraphicRenditionParameter::ItalicParameter,
39    ];
40    println!(
41        "{}test{}test2!{}test3{}",
42        EscapeSequence::SelectGraphicRenditionSequence(params1).to_string(),
43        EscapeSequence::ResetColorsSequence.to_string(),
44        EscapeSequence::SelectGraphicRenditionSequence(params2).to_string(),
45        ASCIIControlCode::CarriageReturnCode.to_string()
46    );
47    //println!("\x1b[55;2mwoo");
48}

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.