[][src]Struct cansi::CategorisedSlice

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,
}

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

Italicised.

underline: bool

Underlined.

blink: bool

Slow blink text.

reversed: boolhidden: bool

Invisible text.

strikethrough: bool

Struck-through.

Trait Implementations

impl<'text> PartialEq<CategorisedSlice<'text>> for CategorisedSlice<'text>[src]

impl<'text> Clone for CategorisedSlice<'text>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'text> Debug for CategorisedSlice<'text>[src]

Auto Trait Implementations

impl<'text> Send for CategorisedSlice<'text>

impl<'text> Sync for CategorisedSlice<'text>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]