fn spawn_launcher_server<F: 'static>(request_handler: F) -> LauncherProxy
    where
        F: Fn(LauncherRequest) + Send,
    {
        let (launcher_proxy, mut launcher_server) = create_proxy_and_stream::<LauncherMarker>()
            .expect("Failed to create launcher proxy and server.");

        fasync::spawn(async move {
            while let Some(launcher_request) = launcher_server.try_next().await.unwrap() {
                request_handler(launcher_request);
            }
        });

        launcher_proxy
    }
/// Spawns a local `fidl_fuchsia_sys::Launcher` server, and returns a proxy to the spawned server.
/// The provided `request_handler` is notified when an incoming request is received.
///
/// # Parameters
/// - `request_handler`: A function which is called with incoming requests to the spawned
///                      `Launcher` server.
/// # Returns
/// A `LauncherProxy` to the spawned server.
Spawns a local `fidl_fuchsia_sys::Launcher` server, and returns a proxy to the spawned server.
The provided `request_handler` is notified when an incoming request is received.
Spawns a local ` fidl_fuchsia_sys :: Launcher ` server and returns a proxy to the spawned server . The provided ` request_handler ` is notified when an incoming request is received .
fn spawn_launcher_server<F: 'static>(request_handler: F) -> LauncherProxy
    where
        F: Fn(LauncherRequest) + Send,
    {
        let (launcher_proxy, mut launcher_server) = create_proxy_and_stream::<LauncherMarker>()
            .expect("Failed to create launcher proxy and server.");
        fasync::spawn(async move {
            while let Some(launcher_request) = launcher_server.try_next().await.unwrap() {
                request_handler(launcher_request);
            }
        });
        launcher_proxy
    }
fn spawn_launcher_server < F : ' static > ( request_handler : F ) -> LauncherProxy where F : Fn ( LauncherRequest ) + Send , { let ( launcher_proxy , mut launcher_server ) = create_proxy_and_stream :: < LauncherMarker > ( ) . expect ( " " ) ; fasync :: spawn ( async move { while let Some ( launcher_request ) = launcher_server . try_next ( ) . await . unwrap ( ) { request_handler ( launcher_request ) ; } } ) ; launcher_proxy }
Spawns a local `fidl_fuchsia_sys::Launcher` server, and returns a proxy to the spawned server.
Spawns a local ` fidl_fuchsia_sys :: Launcher ` server and returns a proxy to the spawned server .
A `LauncherProxy` to the spawned server.
A ` LauncherProxy ` to the spawned server .
request_handler
F
A function which is called with incoming requests to the spawned
`Launcher` server.
A function which is called with incoming requests to the spawned ` Launcher ` server .