pub trait AnonymizedAggregateCapabilityProvider<C: ComponentInstanceInterface>: Send + Sync {
// Required methods
fn list_instances<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<AggregateInstance>, RoutingError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn route_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
instance: &'life1 AggregateInstance
) -> Pin<Box<dyn Future<Output = Result<CapabilitySource<C>, RoutingError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn clone_boxed(&self) -> Box<dyn AnonymizedAggregateCapabilityProvider<C>>;
}
Expand description
A provider of a capability from an aggregation of one or more collections and static children. The instance names in the aggregate will be anonymized.
This trait type-erases the capability type, so it can be handled and hosted generically.
Required Methods§
sourcefn list_instances<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<AggregateInstance>, RoutingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_instances<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<AggregateInstance>, RoutingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists the instances of the capability.
The instance is an opaque identifier that is only meaningful for a subsequent
call to route_instance
.
sourcefn route_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
instance: &'life1 AggregateInstance
) -> Pin<Box<dyn Future<Output = Result<CapabilitySource<C>, RoutingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn route_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
instance: &'life1 AggregateInstance
) -> Pin<Box<dyn Future<Output = Result<CapabilitySource<C>, RoutingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Route the given instance
of the capability to its source.
sourcefn clone_boxed(&self) -> Box<dyn AnonymizedAggregateCapabilityProvider<C>>
fn clone_boxed(&self) -> Box<dyn AnonymizedAggregateCapabilityProvider<C>>
Trait-object compatible clone.