pub struct CargoRenderer<'a> { /* private fields */ }Expand description
A Cargo-style diagnostic renderer.
Implementations§
Source§impl<'a> CargoRenderer<'a>
impl<'a> CargoRenderer<'a>
Sourcepub fn with_config(source_map: &'a SourceMap, config: RenderConfig) -> Self
pub fn with_config(source_map: &'a SourceMap, config: RenderConfig) -> Self
Create a new renderer with custom configuration.
Sourcepub fn render(&self, diagnostic: &Diagnostic, w: &mut impl Write) -> Result<()>
pub fn render(&self, diagnostic: &Diagnostic, w: &mut impl Write) -> Result<()>
Render a diagnostic to the given writer.
Sourcepub fn render_all(&self, diagnostics: &[Diagnostic])
pub fn render_all(&self, diagnostics: &[Diagnostic])
Render all diagnostics to stderr.
Sourcepub fn render_to_string(&self, diagnostic: &Diagnostic) -> String
pub fn render_to_string(&self, diagnostic: &Diagnostic) -> String
Render a diagnostic to a string.
Auto Trait Implementations§
impl<'a> Freeze for CargoRenderer<'a>
impl<'a> RefUnwindSafe for CargoRenderer<'a>
impl<'a> Send for CargoRenderer<'a>
impl<'a> Sync for CargoRenderer<'a>
impl<'a> Unpin for CargoRenderer<'a>
impl<'a> UnsafeUnpin for CargoRenderer<'a>
impl<'a> UnwindSafe for CargoRenderer<'a>
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