pub trait ResolvedInstanceInterface: Send + Sync {
type Component;
// Required methods
fn try_uses(&self) -> Option<Box<[UseDecl]>>;
fn try_exposes(&self) -> Option<Box<[ExposeDecl]>>;
fn try_offers(&self) -> Option<Box<[OfferDecl]>>;
fn try_capabilities(&self) -> Option<Box<[CapabilityDecl]>>;
fn try_collections(&self) -> Option<Box<[CollectionDecl]>>;
fn get_child(
&self,
moniker: &BorrowedChildName,
) -> Option<Arc<Self::Component>>;
fn children_in_collection(
&self,
collection: &Name,
) -> Vec<(ChildName, Arc<Self::Component>)>;
fn address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ComponentAddress, ResolverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn context_to_resolve_children(&self) -> Option<ComponentResolutionContext>;
}Expand description
A trait providing a representation of a resolved component instance.
Required Associated Types§
Required Methods§
Sourcefn try_uses(&self) -> Option<Box<[UseDecl]>>
fn try_uses(&self) -> Option<Box<[UseDecl]>>
Current view of this component’s uses declarations. Implementers are
not required to retain their component declaration and in that case
should return None.
Sourcefn try_exposes(&self) -> Option<Box<[ExposeDecl]>>
fn try_exposes(&self) -> Option<Box<[ExposeDecl]>>
Current view of this component’s exposes declarations. Implementers
are not required to retain their component declaration and in that case
should return None.
Sourcefn try_offers(&self) -> Option<Box<[OfferDecl]>>
fn try_offers(&self) -> Option<Box<[OfferDecl]>>
Current view of this component’s offers declarations. Does not include
any dynamic offers between children of this component. Implementers are
not required to retain their component declaration and in that case
should return None.
Sourcefn try_capabilities(&self) -> Option<Box<[CapabilityDecl]>>
fn try_capabilities(&self) -> Option<Box<[CapabilityDecl]>>
Current view of this component’s capabilities declarations.
Implementers are not required to retain their component declaration and
in that case should return None.
Sourcefn try_collections(&self) -> Option<Box<[CollectionDecl]>>
fn try_collections(&self) -> Option<Box<[CollectionDecl]>>
Current view of this component’s collections declarations.
Implementers are not required to retain their component declaration and
in that case should return None.
Sourcefn get_child(&self, moniker: &BorrowedChildName) -> Option<Arc<Self::Component>>
fn get_child(&self, moniker: &BorrowedChildName) -> Option<Arc<Self::Component>>
Returns a live child of this instance.
Sourcefn children_in_collection(
&self,
collection: &Name,
) -> Vec<(ChildName, Arc<Self::Component>)>
fn children_in_collection( &self, collection: &Name, ) -> Vec<(ChildName, Arc<Self::Component>)>
Returns a vector of the live children in collection.
Sourcefn address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ComponentAddress, ResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ComponentAddress, ResolverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the resolver-ready location of the component, which is either an absolute component URL or a relative path URL with context.
Sourcefn context_to_resolve_children(&self) -> Option<ComponentResolutionContext>
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".