pub trait WithElement<T, W: Warning> {
type Output;
// Required method
fn with_element(self, element: &Element<'_>) -> Self::Output;
}Expand description
Associate a json::Element with a set of deferred Warnings.
A deferred type carries warnings that are not yet tied to the element they describe, which is
how a lowering avoids threading json::Element references through every step. This trait is
the step that ties them, converting each deferred type into its associated counterpart: a
CaveatDeferred becomes a Caveat, and the deferred result type becomes a Verdict.
Required Associated Types§
Required Methods§
Sourcefn with_element(self, element: &Element<'_>) -> Self::Output
fn with_element(self, element: &Element<'_>) -> Self::Output
Associate every Warning carried by self with element.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".