pub struct CategorisedSlice<'text> {
    pub text: &'text str,
    pub start: usize,
    pub end: usize,
    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,
}
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

Expand description

Data structure that holds information about colouring and styling of a text slice.

Fields

text: &'text str
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

The text slice.

start: usize
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

Inclusive starting byte position.

end: usize
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

Exclusive ending byte position.

fg_colour: Color
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

The foreground (or text) colour.

bg_colour: Color
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

The background colour.

intensity: Intensity
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

The emphasis state (bold, faint, normal).

italic: bool
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

Italicised.

underline: bool
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

Underlined.

blink: bool
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

Slow blink text.

reversed: bool
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

hidden: bool
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

Invisible text.

strikethrough: bool
👎 Deprecated:

please use v3::CategorisedSlice to move to API v3.0. this function will be removed with v3.0 of cansi

Struck-through.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Populates with defaults.

Converts to this type from the input type.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.