pub async fn open_child_component_exposed_dir(
    child_name: &str,
    collection_name: &str,
    realm: &fcomponent::RealmProxy,
) -> Result<fio::DirectoryProxy, fcomponent::Error> {
    let mut child_ref = fdecl::ChildRef {
        name: child_name.to_string(),
        collection: Some(collection_name.to_string()),
    };

    let (client_end, server_end) = fidl::endpoints::create_proxy::<fio::DirectoryMarker>()
        .map_err(|_| fcomponent::Error::Internal)?;
    realm
        .open_exposed_dir(&mut child_ref, server_end)
        .await
        .map_err(|_| fcomponent::Error::Internal)??;

    Ok(client_end)
}
/// Opens the exposed directory of a child in the specified `Realm`. This call
/// is expected to follow a matching call to `create_child`.
///
/// # Parameters
/// - `child_name`: The name of the child to bind.
/// - `collection_name`: The name of collection in which the child was created.
/// - `realm`: The `Realm` the child will bound in.
///
/// # Returns
/// `Ok` Result with a DirectoryProxy bound to the component's `exposed_dir`. This directory
/// contains the capabilities that the child exposed to its realm (as declared, for instance, in the
/// `expose` declaration of the component's `.cml` file).
Opens the exposed directory of a child in the specified `Realm`. This call
is expected to follow a matching call to `create_child`.
Opens the exposed directory of a child in the specified ` Realm ` . This call is expected to follow a matching call to ` create_child ` .
pub async fn open_child_component_exposed_dir(
    child_name: &str,
    collection_name: &str,
    realm: &fcomponent::RealmProxy,
) -> Result<fio::DirectoryProxy, fcomponent::Error> {
    let mut child_ref = fdecl::ChildRef {
        name: child_name.to_string(),
        collection: Some(collection_name.to_string()),
    };
    let (client_end, server_end) = fidl::endpoints::create_proxy::<fio::DirectoryMarker>()
        .map_err(|_| fcomponent::Error::Internal)?;
    realm
        .open_exposed_dir(&mut child_ref, server_end)
        .await
        .map_err(|_| fcomponent::Error::Internal)??;
    Ok(client_end)
}
pub async fn open_child_component_exposed_dir ( child_name : & str , collection_name : & str , realm : & fcomponent :: RealmProxy , ) -> Result < fio :: DirectoryProxy , fcomponent :: Error > { let mut child_ref = fdecl :: ChildRef { name : child_name . to_string ( ) , collection : Some ( collection_name . to_string ( ) ) , } ; let ( client_end , server_end ) = fidl :: endpoints :: create_proxy :: < fio :: DirectoryMarker > ( ) . map_err ( | _ | fcomponent :: Error :: Internal ) ? ; realm . open_exposed_dir ( & mut child_ref , server_end ) . await . map_err ( | _ | fcomponent :: Error :: Internal ) ? ? ; Ok ( client_end ) }
Opens the exposed directory of a child in the specified `Realm`.
Opens the exposed directory of a child in the specified ` Realm ` .
child_name
&str
collection_name
&str
realm
&fcomponent::RealmProxy
`Ok` Result with a DirectoryProxy bound to the component's `exposed_dir`. This directory
contains the capabilities that the child exposed to its realm (as declared, for instance, in the
`expose` declaration of the component's `.cml` file).
` Ok ` Result with a DirectoryProxy bound to the component ' s ` exposed_dir ` . This directory contains the capabilities that the child exposed to its realm ( as declared for instance in the ` expose ` declaration of the component ' s ` . cml ` file ) .
child_name
&str
The name of the child to bind.
The name of the child to bind .
collection_name
&str
The name of collection in which the child was created.
The name of collection in which the child was created .
realm
&fcomponent::RealmProxy
The `Realm` the child will bound in.
The ` Realm ` the child will bound in .