/// Launch an application at the specified URL.
Launch an application at the specified URL.
Launch an application at the specified URL .
pub fn launch_with_options(
    launcher: &LauncherProxy,
    url: String,
    arguments: Option<Vec<String>>,
    options: LaunchOptions,
) -> Result<App, Error> {
    let (controller, controller_server_end) = fidl::endpoints::create_proxy()?;
    let (directory_request, directory_server_chan) = zx::Channel::create()?;
    let directory_request = Arc::new(directory_request);
    let mut launch_info = LaunchInfo {
        url,
        arguments,
        out: options.out,
        err: None,
        directory_request: Some(directory_server_chan),
        flat_namespace: options.namespace,
        additional_services: None,
    };
    launcher
        .create_component(&mut launch_info, Some(controller_server_end.into()))
        .context("Failed to start a new Fuchsia application.")?;
    Ok(App { directory_request, controller, stdout: None, stderr: None })
}
pub fn launch_with_options ( launcher : & LauncherProxy , url : String , arguments : Option < Vec < String > > , options : LaunchOptions , ) -> Result < App , Error > { let ( controller , controller_server_end ) = fidl :: endpoints :: create_proxy ( ) ? ; let ( directory_request , directory_server_chan ) = zx :: Channel :: create ( ) ? ; let directory_request = Arc :: new ( directory_request ) ; let mut launch_info = LaunchInfo { url , arguments , out : options . out , err : None , directory_request : Some ( directory_server_chan ) , flat_namespace : options . namespace , additional_services : None , } ; launcher . create_component ( & mut launch_info , Some ( controller_server_end . into ( ) ) ) . context ( " " ) ? ; Ok ( App { directory_request , controller , stdout : None , stderr : None } ) }
Launch an application at the specified URL.
Launch an application at the specified URL .
launcher
&LauncherProxy
url
String
arguments
Option<Vec<String>>
options
LaunchOptions