pub async fn look_up_realm<'a>(
        &'a self,
        look_up_abs_moniker: &'a AbsoluteMoniker,
    ) -> Result<Arc<Realm>, ModelError> {
        let mut cur_realm = self.root_realm.clone();
        for moniker in look_up_abs_moniker.path().iter() {
            cur_realm = {
                await!(cur_realm.resolve_decl())?;
                let cur_state = await!(cur_realm.instance.state.lock());
                let child_realms = cur_state.child_realms.as_ref().unwrap();
                if !child_realms.contains_key(&moniker) {
                    return Err(ModelError::instance_not_found(look_up_abs_moniker.clone()));
                }
                child_realms[moniker].clone()
            }
        }
        await!(cur_realm.resolve_decl())?;
        Ok(cur_realm)
    }
/// Looks up a realm by absolute moniker. The component instance in the realm will be resolved
/// if that has not already happened.
Looks up a realm by absolute moniker. The component instance in the realm will be resolved
if that has not already happened.
Looks up a realm by absolute moniker . The component instance in the realm will be resolved if that has not already happened .
pub async fn look_up_realm<'a>(
        &'a self,
        look_up_abs_moniker: &'a AbsoluteMoniker,
    ) -> Result<Arc<Realm>, ModelError> {
        let mut cur_realm = self.root_realm.clone();
        for moniker in look_up_abs_moniker.path().iter() {
            cur_realm = {
                await!(cur_realm.resolve_decl())?;
                let cur_state = await!(cur_realm.instance.state.lock());
                let child_realms = cur_state.child_realms.as_ref().unwrap();
                if !child_realms.contains_key(&moniker) {
                    return Err(ModelError::instance_not_found(look_up_abs_moniker.clone()));
                }
                child_realms[moniker].clone()
            }
        }
        await!(cur_realm.resolve_decl())?;
        Ok(cur_realm)
    }
pub async fn look_up_realm < ' a > ( & ' a self , look_up_abs_moniker : & ' a AbsoluteMoniker , ) -> Result < Arc < Realm > , ModelError > { let mut cur_realm = self . root_realm . clone ( ) ; for moniker in look_up_abs_moniker . path ( ) . iter ( ) { cur_realm = { await ! ( cur_realm resolve_decl ( ) ) ? ; let cur_state = await ! ( cur_realm instance state lock ( ) ) ; let child_realms = cur_state . child_realms . as_ref ( ) . unwrap ( ) ; if ! child_realms . contains_key ( & moniker ) { return Err ( ModelError :: instance_not_found ( look_up_abs_moniker . clone ( ) ) ) ; } child_realms [ moniker ] . clone ( ) } } await ! ( cur_realm resolve_decl ( ) ) ? ; Ok ( cur_realm ) }
Looks up a realm by absolute moniker.
Looks up a realm by absolute moniker .
&'a self
look_up_abs_moniker
&'a AbsoluteMoniker
&'a self
look_up_abs_moniker
&'a AbsoluteMoniker