pub struct Stylesheet {
pub info: ColorSpec,
pub warning: ColorSpec,
pub error: ColorSpec,
pub linenr: ColorSpec,
pub filename: ColorSpec,
pub content: ColorSpec,
}
Expand description
Set of styles to colorize the output
Fields§
§info: ColorSpec
Color of Severity::Info
annotations
warning: ColorSpec
Color of Severity::Warning
annotations
error: ColorSpec
Color of Severity::Error
annotations
linenr: ColorSpec
Color of line numbers column
filename: ColorSpec
Color of filename
content: ColorSpec
Color of annotated line content
Implementations§
Source§impl Stylesheet
impl Stylesheet
Sourcepub fn monochrome() -> Self
pub fn monochrome() -> Self
Get a monochrome stylesheet without any colors set.
This is also available via Default
.
Sourcepub fn by_severity(&self, severity: &Severity) -> &ColorSpec
pub fn by_severity(&self, severity: &Severity) -> &ColorSpec
Get color of message by its Severity
Trait Implementations§
Source§impl Clone for Stylesheet
impl Clone for Stylesheet
Source§fn clone(&self) -> Stylesheet
fn clone(&self) -> Stylesheet
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Stylesheet
impl Debug for Stylesheet
Source§impl Default for Stylesheet
impl Default for Stylesheet
Source§fn default() -> Stylesheet
fn default() -> Stylesheet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Stylesheet
impl RefUnwindSafe for Stylesheet
impl Send for Stylesheet
impl Sync for Stylesheet
impl Unpin for Stylesheet
impl UnwindSafe for Stylesheet
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