Trait depends::Resolve

source ·
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§

source

type Output<'a> where Self: 'a

Required Methods§

source

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§

source

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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Resolve> Resolve for Rc<T>

§

type Output<'a> = <T as Resolve>::Output<'a> where Self: 'a

source§

fn resolve(&self, visitor: &mut impl Visitor) -> ResolveResult<Self::Output<'_>>

Implementors§

source§

impl<D, F, T> Resolve for DerivedNode<D, F, T>
where for<'a> D: Resolve + IsDirtyInferenceWorkaround<'a> + 'a, for<'a> F: UpdateDerived<Input<'a> = <D as IsDirtyInferenceWorkaround<'a>>::OutputWorkaround, Target<'a> = RefMut<'a, NodeState<T>>> + 'a, T: HashValue + Clean + Named,

§

type Output<'a> = Ref<'a, NodeState<T>> where Self: 'a

source§

impl<T> Resolve for Dependency<T>
where T: Resolve, for<'a> <T as Resolve>::Output<'a>: HashValue,

§

type Output<'a> = DepRef<'a, <T as Resolve>::Output<'a>> where Self: 'a

source§

impl<T> Resolve for InputNode<T>
where T: UpdateInput,

§

type Output<'a> = Ref<'a, NodeState<T>> where Self: 'a