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