/// Adds an element to the current session.
///
/// # Parameters
/// - `element_url`: The URL of the element to add.
/// - `manager_proxy`: The element manager proxy use to propose the element.
///
/// # Errors
/// Returns an error if there is an issue adding the element.
Adds an element to the current session.
Adds an element to the current session .
async fn add_element(
    element_url: &str,
    manager_proxy: felement::ManagerProxy,
) -> Result<(), Error> {
    let spec =
        felement::Spec { component_url: Some(element_url.to_string()), ..felement::Spec::EMPTY };
    manager_proxy
        .propose_element(spec, None)
        .await?
        .map_err(|err: felement::ProposeElementError| format_err!("{:?}", err))
}
async fn add_element ( element_url : & str , manager_proxy : felement :: ManagerProxy , ) -> Result < ( ) , Error > { let spec = felement :: Spec { component_url : Some ( element_url . to_string ( ) ) , .. felement :: Spec :: EMPTY } ; manager_proxy . propose_element ( spec , None ) . await ? . map_err ( | err : felement :: ProposeElementError | format_err ! ( " " err ) ) }
Adds an element to the current session.
Adds an element to the current session .
element_url
&str
The URL of the element to add.
The URL of the element to add .
manager_proxy
felement::ManagerProxy
The element manager proxy use to propose the element.
The element manager proxy use to propose the element .
errors
Returns an error if there is an issue adding the element.
Returns an error if there is an issue adding the element .