pub struct OutputStyle {
pub use_colors: bool,
}Expand description
Output styling configuration
Fields§
§use_colors: boolImplementations§
Source§impl OutputStyle
impl OutputStyle
Sourcepub fn code_block(&self, code: &str, language: &str) -> String
pub fn code_block(&self, code: &str, language: &str) -> String
Format code block with language-specific syntax highlighting
Sourcepub fn error_with_suggestion(&self, error: &str, suggestion: &str) -> String
pub fn error_with_suggestion(&self, error: &str, suggestion: &str) -> String
Format error with suggestions
Sourcepub fn error_with_context(&self, error: &str, context: &str) -> String
pub fn error_with_context(&self, error: &str, context: &str) -> String
Format error with context
Sourcepub fn error_verbose(&self, error: &str, details: &str) -> String
pub fn error_verbose(&self, error: &str, details: &str) -> String
Format verbose error with details
Sourcepub fn error_with_suggestions(
&self,
error: &str,
suggestions: &[&str],
) -> String
pub fn error_with_suggestions( &self, error: &str, suggestions: &[&str], ) -> String
Format error with multiple suggestions
Sourcepub fn error_with_docs(&self, error: &str, doc_url: &str) -> String
pub fn error_with_docs(&self, error: &str, doc_url: &str) -> String
Format error with documentation link
Sourcepub fn numbered_item(&self, number: usize, item: &str) -> String
pub fn numbered_item(&self, number: usize, item: &str) -> String
Format a numbered list item
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputStyle
impl RefUnwindSafe for OutputStyle
impl Send for OutputStyle
impl Sync for OutputStyle
impl Unpin for OutputStyle
impl UnwindSafe for OutputStyle
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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