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
impl EscapeSequence
Sourcepub fn to_string(self) -> String
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§
impl Freeze for EscapeSequence
impl RefUnwindSafe for EscapeSequence
impl Send for EscapeSequence
impl Sync for EscapeSequence
impl Unpin for EscapeSequence
impl UnwindSafe for EscapeSequence
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more