async fn launch_v2_element(
        &self,
        child_name: &str,
        child_url: &str,
    ) -> Result<Element, ElementManagerError> {
        fx_log_info!(
            "launch_v2_element(name={}, url={}, collection={})",
            child_name,
            child_url,
            self.collection
        );
        realm_management::create_child_component(
            &child_name,
            &child_url,
            &self.collection,
            &self.realm,
        )
        .await
        .map_err(|err: fcomponent::Error| {
            ElementManagerError::not_created(child_name, &self.collection, child_url, err)
        })?;

        let directory_channel =
            match realm_management::bind_child_component(child_name, &self.collection, &self.realm)
                .await
            {
                Ok(channel) => channel,
                Err(err) => {
                    return Err(ElementManagerError::not_bound(
                        child_name,
                        self.collection.clone(),
                        child_url,
                        err,
                    ))
                }
            };
        Ok(Element::from_directory_channel(
            directory_channel,
            child_name,
            child_url,
            &self.collection,
        ))
    }
/// Launches a CFv2 component as an element.
///
/// The component is created as a child in the Element Manager's realm.
///
/// # Parameters
/// - `child_name`: The name of the element, must be unique within a session. The name must be
///                 non-empty, of the form [a-z0-9-_.].
/// - `child_url`: The component url of the child added to the session.
///
/// # Returns
/// An Element backed by the CFv2 component.
Launches a CFv2 component as an element.
The component is created as a child in the Element Manager's realm.
Launches a CFv2 component as an element . The component is created as a child in the Element Manager ' s realm .
async fn launch_v2_element(
        &self,
        child_name: &str,
        child_url: &str,
    ) -> Result<Element, ElementManagerError> {
        fx_log_info!(
            "launch_v2_element(name={}, url={}, collection={})",
            child_name,
            child_url,
            self.collection
        );
        realm_management::create_child_component(
            &child_name,
            &child_url,
            &self.collection,
            &self.realm,
        )
        .await
        .map_err(|err: fcomponent::Error| {
            ElementManagerError::not_created(child_name, &self.collection, child_url, err)
        })?;
        let directory_channel =
            match realm_management::bind_child_component(child_name, &self.collection, &self.realm)
                .await
            {
                Ok(channel) => channel,
                Err(err) => {
                    return Err(ElementManagerError::not_bound(
                        child_name,
                        self.collection.clone(),
                        child_url,
                        err,
                    ))
                }
            };
        Ok(Element::from_directory_channel(
            directory_channel,
            child_name,
            child_url,
            &self.collection,
        ))
    }
async fn launch_v2_element ( & self , child_name : & str , child_url : & str , ) -> Result < Element , ElementManagerError > { fx_log_info ! ( " " child_name child_url self collection ) ; realm_management :: create_child_component ( & child_name , & child_url , & self . collection , & self . realm , ) . await . map_err ( | err : fcomponent :: Error | { ElementManagerError :: not_created ( child_name , & self . collection , child_url , err ) } ) ? ; let directory_channel = match realm_management :: bind_child_component ( child_name , & self . collection , & self . realm ) . await { Ok ( channel ) => channel , Err ( err ) => { return Err ( ElementManagerError :: not_bound ( child_name , self . collection . clone ( ) , child_url , err , ) ) } } ; Ok ( Element :: from_directory_channel ( directory_channel , child_name , child_url , & self . collection , ) ) }
Launches a CFv2 component as an element.
Launches a CFv2 component as an element .
&self
child_name
&str
child_url
&str
An Element backed by the CFv2 component.
An Element backed by the CFv2 component .
&self
child_name
&str
The name of the element, must be unique within a session. The name must be
non-empty, of the form [a-z0-9-_.].
The name of the element must be unique within a session . The name must be non - empty of the form [ a - z0 - 9 - _ . ] .
child_url
&str
The component url of the child added to the session.
The component url of the child added to the session .