pub enum Style {
Severity(Severity),
Code,
Caret(Severity),
Location,
Dim,
}Expand description
The semantic styles a diagnostic uses. Each maps to zero or more SGR codes.
Keeping these semantic (rather than Red/Bold) lets the whole palette be
retuned in one place.
Variants§
Severity(Severity)
The error/warning/note/help label and the message in the header.
Code
The diagnostic code, e.g. [Y001].
Caret(Severity)
The caret run underlining a span, in the severity’s color.
Location
The path:line:col location and the | gutter — dimmed.
Dim
Backtrace frame numbers (#0) in the crash debugger — dimmed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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