pub async fn is_child_deleted(parent: &ComponentInstance, child: &ComponentInstance) -> bool {
        let child_moniker = child.abs_moniker.leaf().expect("Root component cannot be destroyed");

        // Verify the parent-child relationship
        assert_eq!(parent.abs_moniker.child(child_moniker.clone()), child.abs_moniker);

        let parent_state = parent.lock_state().await;
        let parent_resolved_state = match *parent_state {
            InstanceState::Resolved(ref s) => s,
            _ => panic!("not resolved"),
        };

        let child_state = child.lock_state().await;
        let child_execution = child.lock_execution().await;
        let found_child_moniker = parent_resolved_state.all_children().get(child_moniker);

        found_child_moniker.is_none()
            && matches!(*child_state, InstanceState::Destroyed)
            && child_execution.runtime.is_none()
            && child_execution.is_shut_down()
    }
/// Verifies that a child component is deleted by checking its InstanceState and verifying that
/// it does not exist in the InstanceState of its parent. Assumes the parent is not destroyed
/// yet.
Verifies that a child component is deleted by checking its InstanceState and verifying that
it does not exist in the InstanceState of its parent. Assumes the parent is not destroyed
yet.
Verifies that a child component is deleted by checking its InstanceState and verifying that it does not exist in the InstanceState of its parent . Assumes the parent is not destroyed yet .
pub async fn is_child_deleted(parent: &ComponentInstance, child: &ComponentInstance) -> bool {
        let child_moniker = child.abs_moniker.leaf().expect("Root component cannot be destroyed");
        // Verify the parent-child relationship
        assert_eq!(parent.abs_moniker.child(child_moniker.clone()), child.abs_moniker);
        let parent_state = parent.lock_state().await;
        let parent_resolved_state = match *parent_state {
            InstanceState::Resolved(ref s) => s,
            _ => panic!("not resolved"),
        };
        let child_state = child.lock_state().await;
        let child_execution = child.lock_execution().await;
        let found_child_moniker = parent_resolved_state.all_children().get(child_moniker);
        found_child_moniker.is_none()
            && matches!(*child_state, InstanceState::Destroyed)
            && child_execution.runtime.is_none()
            && child_execution.is_shut_down()
    }
pub async fn is_child_deleted ( parent : & ComponentInstance , child : & ComponentInstance ) -> bool { let child_moniker = child . abs_moniker . leaf ( ) . expect ( " " ) ; // Verify the parent-child relationship assert_eq ! ( parent abs_moniker child ( child_moniker clone ( ) ) child abs_moniker ) ; let parent_state = parent . lock_state ( ) . await ; let parent_resolved_state = match * parent_state { InstanceState :: Resolved ( ref s ) => s , _ => panic ! ( " " ) , } ; let child_state = child . lock_state ( ) . await ; let child_execution = child . lock_execution ( ) . await ; let found_child_moniker = parent_resolved_state . all_children ( ) . get ( child_moniker ) ; found_child_moniker . is_none ( ) && matches ! ( child_state InstanceState Destroyed ) && child_execution . runtime . is_none ( ) && child_execution . is_shut_down ( ) }
Verifies that a child component is deleted by checking its InstanceState and verifying that
it does not exist in the InstanceState of its parent.
Verifies that a child component is deleted by checking its InstanceState and verifying that it does not exist in the InstanceState of its parent .
parent
&ComponentInstance
child
&ComponentInstance
parent
&ComponentInstance
child
&ComponentInstance