Skip to main content

Resolve

Trait Resolve 

Source
pub trait Resolve: Send + Sync {
    // Required method
    fn chain(&self, target: &str) -> Option<Vec<ScopeRef>>;
}
Expand description

Where a target lives. Answered from memory.

Required Methods§

Source

fn chain(&self, target: &str) -> Option<Vec<ScopeRef>>

The scopes a target lives in, innermost first, ending in ScopeRef::Everywhere: "MENGER-12" → [MENGER-12, MENGER, *] (or, for a service whose memberships are per shortcode, [MENGER, *]). None: the value locates nothing — the call is refused.

The gate also asks it about scope names (a membership’s or a ceiling’s): chain("MENGER") → [MENGER, PLEXUS, *], to tell which of two scopes lies within the other when it narrows a reach by a ceiling. A service that cannot answer for a name returns None, and two different names are then taken as disjoint.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§