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 Diagnostics for the implementer but only if passed a required object.

Required Methods§

Calls the specified function f with an instance of a Diagnostic. This can be used to perform lazy diagnostic evaluation.

Implementations on Foreign Types§

Implementors§