pub trait ResolvedInstanceInterface: Send + Sync {
    type Component;

    // Required methods
    fn uses(&self) -> Vec<UseDecl>;
    fn exposes(&self) -> Vec<ExposeDecl>;
    fn offers(&self) -> Vec<OfferDecl>;
    fn capabilities(&self) -> Vec<CapabilityDecl>;
    fn collections(&self) -> Vec<CollectionDecl>;
    fn get_child(&self, moniker: &ChildName) -> Option<Arc<Self::Component>>;
    fn children_in_collection(
        &self,
        collection: &Name
    ) -> Vec<(ChildName, Arc<Self::Component>)>;
    fn address(&self) -> ComponentAddress;
    fn context_to_resolve_children(&self) -> Option<ComponentResolutionContext>;
}
Expand description

A trait providing a representation of a resolved component instance.

Required Associated Types§

source

type Component

Type representing a (unlocked and potentially unresolved) component instance.

Required Methods§

source

fn uses(&self) -> Vec<UseDecl>

Current view of this component’s uses declarations.

source

fn exposes(&self) -> Vec<ExposeDecl>

Current view of this component’s exposes declarations.

source

fn offers(&self) -> Vec<OfferDecl>

Current view of this component’s offers declarations.

source

fn capabilities(&self) -> Vec<CapabilityDecl>

Current view of this component’s capabilities declarations.

source

fn collections(&self) -> Vec<CollectionDecl>

Current view of this component’s collections declarations.

source

fn get_child(&self, moniker: &ChildName) -> Option<Arc<Self::Component>>

Returns a live child of this instance.

source

fn children_in_collection( &self, collection: &Name ) -> Vec<(ChildName, Arc<Self::Component>)>

Returns a vector of the live children in collection.

source

fn address(&self) -> ComponentAddress

Returns the resolver-ready location of the component, which is either an absolute component URL or a relative path URL with context.

source

fn context_to_resolve_children(&self) -> Option<ComponentResolutionContext>

Returns the context to be used to resolve a component from a path relative to this component (for example, a component in a subpackage). If None, the resolver cannot resolve relative path component URLs.

Implementors§