pub enum CapabilitySource<C: ComponentInstanceInterface> {
Component {
capability: ComponentCapability,
component: WeakComponentInstanceInterface<C>,
},
Framework {
capability: InternalCapability,
component: WeakComponentInstanceInterface<C>,
},
Builtin {
capability: InternalCapability,
top_instance: Weak<C::TopInstance>,
},
Namespace {
capability: ComponentCapability,
top_instance: Weak<C::TopInstance>,
},
Capability {
source_capability: ComponentCapability,
component: WeakComponentInstanceInterface<C>,
},
AnonymizedAggregate {
capability: AggregateCapability,
component: WeakComponentInstanceInterface<C>,
aggregate_capability_provider: Box<dyn AnonymizedAggregateCapabilityProvider<C>>,
members: Vec<AggregateMember>,
},
FilteredAggregate {
capability: AggregateCapability,
capability_provider: Box<dyn FilteredAggregateCapabilityProvider<C>>,
component: WeakComponentInstanceInterface<C>,
},
Environment {
capability: ComponentCapability,
component: WeakComponentInstanceInterface<C>,
},
Void {
capability: InternalCapability,
component: WeakComponentInstanceInterface<C>,
},
}
Expand description
Describes the source of a capability, as determined by find_capability_source
Variants§
Component
This capability originates from the component instance for the given Realm. point.
Framework
This capability originates from “framework”. It’s implemented by component manager and is scoped to the realm of the source.
Builtin
This capability originates from the parent of the root component, and is built in to
component manager. top_instance
is the instance at the top of the tree, i.e. the
instance representing component manager.
Namespace
This capability originates from the parent of the root component, and is offered from
component manager’s namespace. top_instance
is the instance at the top of the tree, i.e.
the instance representing component manager.
Capability
This capability is provided by the framework based on some other capability.
AnonymizedAggregate
This capability is an aggregate of capabilities over a set of collections and static children. The instance names in the aggregate service will be anonymized.
Fields
capability: AggregateCapability
component: WeakComponentInstanceInterface<C>
aggregate_capability_provider: Box<dyn AnonymizedAggregateCapabilityProvider<C>>
members: Vec<AggregateMember>
FilteredAggregate
This capability is an aggregate of capabilities over a set of children with filters The instances in the aggregate service are the union of these filters.
Fields
capability: AggregateCapability
capability_provider: Box<dyn FilteredAggregateCapabilityProvider<C>>
component: WeakComponentInstanceInterface<C>
Environment
Void
Implementations§
source§impl<C: ComponentInstanceInterface> CapabilitySource<C>
impl<C: ComponentInstanceInterface> CapabilitySource<C>
sourcepub fn can_be_in_namespace(&self) -> bool
pub fn can_be_in_namespace(&self) -> bool
Returns whether the given CapabilitySourceInterface can be available in a component’s namespace.