pub trait Resolve {
type Output<'a>
where Self: 'a;
// Required method
fn resolve(
&self,
visitor: &mut impl Visitor,
) -> ResolveResult<Self::Output<'_>>;
// Provided method
fn resolve_root(
&self,
visitor: &mut impl Visitor,
) -> ResolveResult<Self::Output<'_>> { ... }
}Expand description
A Depth-first search resolver, used to recursively pass a Visitor through a graph, updating dependencies.
Required Associated Types§
Required Methods§
Sourcefn resolve(&self, visitor: &mut impl Visitor) -> ResolveResult<Self::Output<'_>>
fn resolve(&self, visitor: &mut impl Visitor) -> ResolveResult<Self::Output<'_>>
You’re probably looking for resolve_root. This is recursively called on each node when a graph is being resolved.
Pass a Visitor through this node, resolve the latest version of all dependencies and return this node’s output.
Provided Methods§
Sourcefn resolve_root(
&self,
visitor: &mut impl Visitor,
) -> ResolveResult<Self::Output<'_>>
fn resolve_root( &self, visitor: &mut impl Visitor, ) -> ResolveResult<Self::Output<'_>>
Pass a Visitor through this node, resolve the latest version of all dependencies, reset the visitor and return this node’s output.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.