pub struct ErrorStyle {
pub use_color: bool,
pub use_unicode: bool,
pub compact: bool,
}Expand description
Style configuration for error output
Fields§
§use_color: bool§use_unicode: bool§compact: boolImplementations§
Source§impl ErrorStyle
impl ErrorStyle
Sourcepub fn level_style(
&self,
level: DiagnosticLevel,
) -> (&'static str, String, &'static str)
pub fn level_style( &self, level: DiagnosticLevel, ) -> (&'static str, String, &'static str)
Get the appropriate error level styling
Sourcepub fn path_style(&self) -> (String, &'static str)
pub fn path_style(&self) -> (String, &'static str)
Get the style for file paths
Sourcepub fn line_number_style(&self) -> (&'static str, &'static str)
pub fn line_number_style(&self) -> (&'static str, &'static str)
Get the style for line numbers
Sourcepub fn error_style(&self) -> (String, &'static str)
pub fn error_style(&self) -> (String, &'static str)
Get the style for error underlining
Sourcepub fn note_style(&self) -> (String, &'static str)
pub fn note_style(&self) -> (String, &'static str)
Get the style for notes
Sourcepub fn suggestion_style(&self) -> (String, &'static str)
pub fn suggestion_style(&self) -> (String, &'static str)
Get the style for suggestions
Sourcepub fn get_chars(&self) -> DrawingChars
pub fn get_chars(&self) -> DrawingChars
Get unicode or ASCII characters for drawing
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorStyle
impl RefUnwindSafe for ErrorStyle
impl Send for ErrorStyle
impl Sync for ErrorStyle
impl Unpin for ErrorStyle
impl UnsafeUnpin for ErrorStyle
impl UnwindSafe for ErrorStyle
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