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§

source

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.

source

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.

source

fn clone_boxed(&self) -> Box<dyn AnonymizedAggregateCapabilityProvider<C>>

Trait-object compatible clone.

Trait Implementations§

source§

impl<C: ComponentInstanceInterface> Clone for Box<dyn AnonymizedAggregateCapabilityProvider<C>>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<C> Debug for Box<dyn AnonymizedAggregateCapabilityProvider<C>>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§