Struct cansi::CategorisedSlice
source · 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
Inverted colours. See https://en.wikipedia.org/wiki/Reverse_video.
👎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
sourceimpl<'text> Clone for CategorisedSlice<'text>
impl<'text> Clone for CategorisedSlice<'text>
sourcefn clone(&self) -> CategorisedSlice<'text>
fn clone(&self) -> CategorisedSlice<'text>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'text> Debug for CategorisedSlice<'text>
impl<'text> Debug for CategorisedSlice<'text>
sourceimpl<'a> From<CategorisedSlice<'a>> for CategorisedSlice<'a>
impl<'a> From<CategorisedSlice<'a>> for CategorisedSlice<'a>
Populates with defaults.
sourcefn from(x: CategorisedSlice<'a>) -> Self
fn from(x: CategorisedSlice<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<CategorisedSlice<'a>> for CategorisedSlice<'a>
impl<'a> From<CategorisedSlice<'a>> for CategorisedSlice<'a>
sourcefn from(x: CategorisedSlice<'a>) -> Self
fn from(x: CategorisedSlice<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'text> PartialEq<CategorisedSlice<'text>> for CategorisedSlice<'text>
impl<'text> PartialEq<CategorisedSlice<'text>> for CategorisedSlice<'text>
sourcefn eq(&self, other: &CategorisedSlice<'text>) -> bool
fn eq(&self, other: &CategorisedSlice<'text>) -> bool
impl<'text> Copy for CategorisedSlice<'text>
impl<'text> Eq for CategorisedSlice<'text>
impl<'text> StructuralEq for CategorisedSlice<'text>
impl<'text> StructuralPartialEq for CategorisedSlice<'text>
Auto Trait Implementations
impl<'text> RefUnwindSafe for CategorisedSlice<'text>
impl<'text> Send for CategorisedSlice<'text>
impl<'text> Sync for CategorisedSlice<'text>
impl<'text> Unpin for CategorisedSlice<'text>
impl<'text> UnwindSafe for CategorisedSlice<'text>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more