pub enum SgrCode {
Show 71 variants
Reset = 0,
IntensityBold = 1,
IntensityDim = 2,
ItalicOn = 3,
UnderlineOn = 4,
BlinkOn = 5,
RapidBlinkOn = 6,
InverseOn = 7,
InvisibleOn = 8,
StrikeThroughOn = 9,
DefaultFont = 10,
AltFont1 = 11,
AltFont2 = 12,
AltFont3 = 13,
AltFont4 = 14,
AltFont5 = 15,
AltFont6 = 16,
AltFont7 = 17,
AltFont8 = 18,
AltFont9 = 19,
UnderlineDouble = 21,
NormalIntensity = 22,
ItalicOff = 23,
UnderlineOff = 24,
BlinkOff = 25,
InverseOff = 27,
InvisibleOff = 28,
StrikeThroughOff = 29,
ForegroundBlack = 30,
ForegroundRed = 31,
ForegroundGreen = 32,
ForegroundYellow = 33,
ForegroundBlue = 34,
ForegroundMagenta = 35,
ForegroundCyan = 36,
ForegroundWhite = 37,
ForegroundDefault = 39,
BackgroundBlack = 40,
BackgroundRed = 41,
BackgroundGreen = 42,
BackgroundYellow = 43,
BackgroundBlue = 44,
BackgroundMagenta = 45,
BackgroundCyan = 46,
BackgroundWhite = 47,
BackgroundDefault = 49,
OverlineOn = 53,
OverlineOff = 55,
UnderlineColor = 58,
ResetUnderlineColor = 59,
VerticalAlignSuperScript = 73,
VerticalAlignSubScript = 74,
VerticalAlignBaseLine = 75,
ForegroundBrightBlack = 90,
ForegroundBrightRed = 91,
ForegroundBrightGreen = 92,
ForegroundBrightYellow = 93,
ForegroundBrightBlue = 94,
ForegroundBrightMagenta = 95,
ForegroundBrightCyan = 96,
ForegroundBrightWhite = 97,
BackgroundBrightBlack = 100,
BackgroundBrightRed = 101,
BackgroundBrightGreen = 102,
BackgroundBrightYellow = 103,
BackgroundBrightBlue = 104,
BackgroundBrightMagenta = 105,
BackgroundBrightCyan = 106,
BackgroundBrightWhite = 107,
ForegroundColor = 38,
BackgroundColor = 48,
}
Variants§
Reset = 0
IntensityBold = 1
IntensityDim = 2
ItalicOn = 3
UnderlineOn = 4
BlinkOn = 5
Blinks < 150 times per minute
RapidBlinkOn = 6
Blinks > 150 times per minute
InverseOn = 7
InvisibleOn = 8
StrikeThroughOn = 9
DefaultFont = 10
AltFont1 = 11
AltFont2 = 12
AltFont3 = 13
AltFont4 = 14
AltFont5 = 15
AltFont6 = 16
AltFont7 = 17
AltFont8 = 18
AltFont9 = 19
UnderlineDouble = 21
NormalIntensity = 22
ItalicOff = 23
UnderlineOff = 24
BlinkOff = 25
InverseOff = 27
InvisibleOff = 28
StrikeThroughOff = 29
ForegroundBlack = 30
ForegroundRed = 31
ForegroundGreen = 32
ForegroundYellow = 33
ForegroundBlue = 34
ForegroundMagenta = 35
ForegroundCyan = 36
ForegroundWhite = 37
ForegroundDefault = 39
BackgroundBlack = 40
BackgroundRed = 41
BackgroundGreen = 42
BackgroundYellow = 43
BackgroundBlue = 44
BackgroundMagenta = 45
BackgroundCyan = 46
BackgroundWhite = 47
BackgroundDefault = 49
OverlineOn = 53
OverlineOff = 55
UnderlineColor = 58
ResetUnderlineColor = 59
VerticalAlignSuperScript = 73
VerticalAlignSubScript = 74
VerticalAlignBaseLine = 75
ForegroundBrightBlack = 90
ForegroundBrightRed = 91
ForegroundBrightGreen = 92
ForegroundBrightYellow = 93
ForegroundBrightBlue = 94
ForegroundBrightMagenta = 95
ForegroundBrightCyan = 96
ForegroundBrightWhite = 97
BackgroundBrightBlack = 100
BackgroundBrightRed = 101
BackgroundBrightGreen = 102
BackgroundBrightYellow = 103
BackgroundBrightBlue = 104
BackgroundBrightMagenta = 105
BackgroundBrightCyan = 106
BackgroundBrightWhite = 107
ForegroundColor = 38
Maybe followed either either a 256 color palette index or a sequence describing a true color rgb value
BackgroundColor = 48
Trait Implementations§
source§impl FromPrimitive for SgrCode
impl FromPrimitive for SgrCode
source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§impl PartialEq for SgrCode
impl PartialEq for SgrCode
impl Eq for SgrCode
impl StructuralEq for SgrCode
impl StructuralPartialEq for SgrCode
Auto Trait Implementations§
impl RefUnwindSafe for SgrCode
impl Send for SgrCode
impl Sync for SgrCode
impl Unpin for SgrCode
impl UnwindSafe for SgrCode
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