pub fn render<'gcx>(
        &self,
        buf: &mut Buffer,
        sourcemgr: &'gcx SourceMgr,
        config: Option<&Config>,
    ) -> CalResult<()> {
        let def_config = Config::default();
        let config = config.unwrap_or(&def_config);

        term::emit(buf, config, sourcemgr, &self.0).map_err(DiagnosticError::from)?;
        writeln!(buf)?;

        Ok(())
    }
/// Render the diagnostic to the provided buffer. This will add a newline
/// at the end.
///
/// # Errors
///
/// This function will error if rendering the diagnostic or writing to the
/// buffer failed.
Render the diagnostic to the provided buffer. This will add a newline
at the end.
Render the diagnostic to the provided buffer . This will add a newline at the end .
pub fn render<'gcx>(
        &self,
        buf: &mut Buffer,
        sourcemgr: &'gcx SourceMgr,
        config: Option<&Config>,
    ) -> CalResult<()> {
        let def_config = Config::default();
        let config = config.unwrap_or(&def_config);
        term::emit(buf, config, sourcemgr, &self.0).map_err(DiagnosticError::from)?;
        writeln!(buf)?;
        Ok(())
    }
pub fn render < ' gcx > ( & self , buf : & mut Buffer , sourcemgr : & ' gcx SourceMgr , config : Option < & Config > , ) -> CalResult < ( ) > { let def_config = Config :: default ( ) ; let config = config . unwrap_or ( & def_config ) ; term :: emit ( buf , config , sourcemgr , & self . 0 ) . map_err ( DiagnosticError :: from ) ? ; writeln ! ( buf ) ? ; Ok ( ( ) ) }
Render the diagnostic to the provided buffer.
Render the diagnostic to the provided buffer .
&self
buf
&mut Buffer
sourcemgr
&'gcx SourceMgr
config
Option<&Config>
&self
buf
&mut Buffer
sourcemgr
&'gcx SourceMgr
config
Option<&Config>
errors
This function will error if rendering the diagnostic or writing to the
buffer failed.
This function will error if rendering the diagnostic or writing to the buffer failed .