/// Returns true if the given child (live or deleting) exists.
Returns true if the given child (live or deleting) exists.
Returns true if the given child ( live or deleting ) exists .
pub async fn has_child<'a>(component: &'a ComponentInstance, moniker: &'a str) -> bool {
    match *component.lock_state().await {
        InstanceState::Resolved(ref s) => s.all_children().contains_key(&moniker.into()),
        InstanceState::Destroyed => false,
        _ => {
            panic!("not resolved")
        }
    }
}
pub async fn has_child < ' a > ( component : & ' a ComponentInstance , moniker : & ' a str ) -> bool { match * component . lock_state ( ) . await { InstanceState :: Resolved ( ref s ) => s . all_children ( ) . contains_key ( & moniker . into ( ) ) , InstanceState :: Destroyed => false , _ => { panic ! ( " " ) } } }
Returns true if the given child (live or deleting) exists.
Returns true if the given child ( live or deleting ) exists .
component
&'a ComponentInstance
moniker
&'a str