/// Waits for the OnOpen event on the directory. This will hang until the component starts
/// serving that directory. The directory should have been cloned/opened with DESCRIBE.
Waits for the OnOpen event on the directory. This will hang until the component starts
serving that directory. The directory should have been cloned/opened with DESCRIBE.
Waits for the OnOpen event on the directory . This will hang until the component starts serving that directory . The directory should have been cloned / opened with DESCRIBE .
async fn wait_for_on_open(
        &self,
        outgoing_dir: &DirectoryProxy,
        target_moniker: &AbsoluteMoniker,
    ) -> Result<(), ModelError> {
        let mut events = outgoing_dir.take_event_stream();
        match events.next().await {
            Some(Ok(DirectoryEvent::OnOpen_ { s: status, info: _ })) => zx::Status::ok(status)
                .map_err(|_| ModelError::open_directory_error(target_moniker.clone(), "/")),
            _ => Err(ModelError::open_directory_error(target_moniker.clone(), "/")),
        }
    }
async fn wait_for_on_open ( & self , outgoing_dir : & DirectoryProxy , target_moniker : & AbsoluteMoniker , ) -> Result < ( ) , ModelError > { let mut events = outgoing_dir . take_event_stream ( ) ; match events . next ( ) . await { Some ( Ok ( DirectoryEvent :: OnOpen_ { s : status , info : _ } ) ) => zx :: Status :: ok ( status ) . map_err ( | _ | ModelError :: open_directory_error ( target_moniker . clone ( ) , " " ) ) , _ => Err ( ModelError :: open_directory_error ( target_moniker . clone ( ) , " " ) ) , } }
Waits for the OnOpen event on the directory.
Waits for the OnOpen event on the directory .
&self
outgoing_dir
&DirectoryProxy
target_moniker
&AbsoluteMoniker