Struct cansi::CategorisedSlice
source · pub struct CategorisedSlice<'text> {
pub text_as_bytes: &'text [u8],
pub fg_colour: Color,
pub bg_colour: Color,
pub intensity: Intensity,
pub italic: bool,
pub underline: bool,
pub blink: bool,
pub reversed: bool,
pub hidden: bool,
pub strikethrough: bool,
}
Expand description
Data structure that holds information about colouring and styling of a text slice.
Fields§
§text_as_bytes: &'text [u8]
The text slice as a byte array.
Note
Once the crate parse-ansi
moves to regex
crate 1.1.0
it will be possible to return a string slice (&str
).
fg_colour: Color
The foreground (or text) colour.
bg_colour: Color
The background colour.
intensity: Intensity
The emphasis state (bold, faint, normal).
italic: bool
§underline: bool
§blink: bool
Slow blink text.
reversed: bool
Inverted colours. See https://en.wikipedia.org/wiki/Reverse_video.
Invisible text.
strikethrough: bool