pub fn render<'gcx>(
        &self,
        buf: &mut Buffer,
        sourcemgr: &'gcx SourceMgr,
        config: Option<&Config>,
    ) -> CalResult<()> {
        match self {
            Self::One(diag) => diag.render(buf, sourcemgr, config),
            Self::Many(diags) => diags
                .iter()
                .try_for_each(|diag| diag.render(buf, sourcemgr, config)),
        }
    }
/// Render the ensemble 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.
// TODO(@ThePuzzlemaker: diag|cli): use compact displaystyle for syntax
//   errors, add "force rich error" CLI arg for syntax errors
Render the ensemble diagnostic to the provided buffer. This will add a
newline at the end.
Render the ensemble 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<()> {
        match self {
            Self::One(diag) => diag.render(buf, sourcemgr, config),
            Self::Many(diags) => diags
                .iter()
                .try_for_each(|diag| diag.render(buf, sourcemgr, config)),
        }
    }
pub fn render < ' gcx > ( & self , buf : & mut Buffer , sourcemgr : & ' gcx SourceMgr , config : Option < & Config > , ) -> CalResult < ( ) > { match self { Self :: One ( diag ) => diag . render ( buf , sourcemgr , config ) , Self :: Many ( diags ) => diags . iter ( ) . try_for_each ( | diag | diag . render ( buf , sourcemgr , config ) ) , } }
Render the ensemble diagnostic to the provided buffer.
Render the ensemble 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.
TODO(@ThePuzzlemaker: diag|cli): use compact displaystyle for syntax
errors, add "force rich error" CLI arg for syntax errors
This function will error if rendering the diagnostic or writing to the buffer failed . TODO ( @ThePuzzlemaker : diag|cli ) : use compact displaystyle for syntax errors add " force rich error " CLI arg for syntax errors