pub enum Role {
Show 19 variants
Plain,
Dim,
Title,
Strong,
Path,
LineNumber,
Ordinal,
Symbol,
Declaration,
Import,
Address,
Error,
Warning,
Hint,
Hit,
Added,
Removed,
Hunk,
Mark(Mark),
}Expand description
The semantic role of a run of text. A backend names the colour; the data never carries one.
Variants§
Plain
No style of its own.
Dim
A word around the answer: a label, a count.
Title
A heading or a section label.
Strong
An emphasised word: a count, a history id, a module header.
Path
A file path.
LineNumber
A line number.
Ordinal
A row’s number.
Symbol
A declaration’s modifier.
Declaration
● and a declaration’s kind name.
Import
An import, or the text around one.
Address
A fully-qualified address — a re-export alias.
Error
✗ and an error.
Warning
! and a warning.
Hint
hint: and what to try instead.
Hit
The hit within a line.
Added
A line a change adds.
Removed
A line a change removes.
Hunk
A diff hunk header.
Mark(Mark)
A mark’s glyph (●, ✓, →): the renderer colours it by the mark.
Trait Implementations§
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more