Trait mun_diagnostics::DiagnosticFor
source · pub trait DiagnosticFor {
fn with_diagnostic<R, F: FnMut(&dyn Diagnostic) -> R>(&self, f: F) -> R;
}
Expand description
When implemented enables requesting Diagnostic
s for the implementer.
Required Methods§
sourcefn with_diagnostic<R, F: FnMut(&dyn Diagnostic) -> R>(&self, f: F) -> R
fn with_diagnostic<R, F: FnMut(&dyn Diagnostic) -> R>(&self, f: F) -> R
Calls the specified function f
with an instance of a Diagnostic
. This can be used
to perform lazy diagnostic evaluation.