pub struct Environment<Component: ComponentInstanceInterface> { /* private fields */ }
Implementations§
Source§impl<C: ComponentInstanceInterface> Environment<C>
impl<C: ComponentInstanceInterface> Environment<C>
pub fn new( name: Option<Name>, parent: WeakExtendedInstanceInterface<C>, extends: EnvironmentExtends, runner_registry: RunnerRegistry, debug_registry: DebugRegistry, ) -> Self
Sourcepub fn name(&self) -> Option<&Name>
pub fn name(&self) -> Option<&Name>
The name of this environment as defined by its creator.
Should be None
for the root environment.
Sourcepub fn parent(&self) -> &WeakExtendedInstanceInterface<C>
pub fn parent(&self) -> &WeakExtendedInstanceInterface<C>
The parent component instance or top instance that created or inherited the environment.
Sourcepub fn extends(&self) -> &EnvironmentExtends
pub fn extends(&self) -> &EnvironmentExtends
The relationship of this environment to that of the component instance’s parent.
Sourcepub fn runner_registry(&self) -> &RunnerRegistry
pub fn runner_registry(&self) -> &RunnerRegistry
The runners available in this environment.
Sourcepub fn debug_registry(&self) -> &DebugRegistry
pub fn debug_registry(&self) -> &DebugRegistry
Protocols avaliable in this environment as debug capabilities.
Sourcepub fn get_registered_runner(
&self,
name: &Name,
) -> Result<Option<(ExtendedInstanceInterface<C>, RunnerRegistration)>, ComponentInstanceError>
pub fn get_registered_runner( &self, name: &Name, ) -> Result<Option<(ExtendedInstanceInterface<C>, RunnerRegistration)>, ComponentInstanceError>
Returns the runner registered to name
and the component that created the environment the
runner was registered to. Returns None
if there was no match.
Sourcepub fn get_debug_capability(
&self,
name: &Name,
) -> Result<Option<(ExtendedInstanceInterface<C>, Option<Name>, DebugRegistration)>, ComponentInstanceError>
pub fn get_debug_capability( &self, name: &Name, ) -> Result<Option<(ExtendedInstanceInterface<C>, Option<Name>, DebugRegistration)>, ComponentInstanceError>
Returns the debug capability registered to name
, the realm that created the environment
and the capability was registered to (None
for component manager’s realm) and name of the
environment that registered the capability. Returns None
if there was no match.