fn valid_mock_device_proxy<F>(request_fn: F) -> DeviceProxy
        where
            F: (Fn(DeviceRequest) -> ()) + Send + 'static,
        {
            let (device_proxy, mut stream) = create_proxy_and_stream::<DeviceMarker>()
                .expect("Failed to create proxy and stream");
            fasync::spawn(async move {
                while let Some(req) = stream.try_next().await.expect("Failed to read req") {
                    request_fn(req)
                }
            });
            device_proxy
        }
/// Creates a mock device proxy that will invoke the supplied function on each request.
Creates a mock device proxy that will invoke the supplied function on each request.
Creates a mock device proxy that will invoke the supplied function on each request .
fn valid_mock_device_proxy<F>(request_fn: F) -> DeviceProxy
        where
            F: (Fn(DeviceRequest) -> ()) + Send + 'static,
        {
            let (device_proxy, mut stream) = create_proxy_and_stream::<DeviceMarker>()
                .expect("Failed to create proxy and stream");
            fasync::spawn(async move {
                while let Some(req) = stream.try_next().await.expect("Failed to read req") {
                    request_fn(req)
                }
            });
            device_proxy
        }
fn valid_mock_device_proxy < F > ( request_fn : F ) -> DeviceProxy where F : ( Fn ( DeviceRequest ) -> ( ) ) + Send + ' static , { let ( device_proxy , mut stream ) = create_proxy_and_stream :: < DeviceMarker > ( ) . expect ( " " ) ; fasync :: spawn ( async move { while let Some ( req ) = stream . try_next ( ) . await . expect ( " " ) { request_fn ( req ) } } ) ; device_proxy }
Creates a mock device proxy that will invoke the supplied function on each request.
Creates a mock device proxy that will invoke the supplied function on each request .
request_fn
F