Struct cansi::v3::CategorisedSlice
source · pub struct CategorisedSlice<'text> {
pub text: &'text str,
pub start: usize,
pub end: usize,
pub fg: Option<Color>,
pub bg: Option<Color>,
pub intensity: Option<Intensity>,
pub italic: Option<bool>,
pub underline: Option<bool>,
pub blink: Option<bool>,
pub reversed: Option<bool>,
pub hidden: Option<bool>,
pub strikethrough: Option<bool>,
}
Expand description
Data structure that holds information about colouring and styling of a text slice.
Fields
text: &'text str
The text slice.
start: usize
Inclusive starting byte position.
end: usize
Exclusive ending byte position.
fg: Option<Color>
The foreground (or text) colour.
bg: Option<Color>
The background colour.
intensity: Option<Intensity>
The emphasis state (bold, faint, normal).
italic: Option<bool>
Italicised.
underline: Option<bool>
Underlined.
blink: Option<bool>
Slow blink text.
reversed: Option<bool>
Inverted colours. See https://en.wikipedia.org/wiki/Reverse_video.
Invisible text.
strikethrough: Option<bool>
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