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: ColorSpecColor of Severity::Info annotations
warning: ColorSpecColor of Severity::Warning annotations
error: ColorSpecColor of Severity::Error annotations
linenr: ColorSpecColor of line numbers column
filename: ColorSpecColor of filename
content: ColorSpecColor 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 duplicate 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