pub async fn ot_radio_set_channel(device: &File) -> Result<ClientEnd<DeviceMarker>, Error> {
    let device_setup_channel = fasync::Channel::from_channel(fdio::clone_channel(device)?)?;
    let device_setup_proxy = DeviceSetupProxy::new(device_setup_channel);
    let (client_side, server_side) = create_endpoints::<DeviceMarker>()?;
    match device_setup_proxy.set_channel(server_side.into_channel()).await {
        Ok(_r) => Ok(client_side),
        Err(e) => Err(e.into()),
    }
}
/// Connect to driver and pass a FIDL channel which talks Device protocol
Connect to driver and pass a FIDL channel which talks Device protocol
Connect to driver and pass a FIDL channel which talks Device protocol
pub async fn ot_radio_set_channel(device: &File) -> Result<ClientEnd<DeviceMarker>, Error> {
    let device_setup_channel = fasync::Channel::from_channel(fdio::clone_channel(device)?)?;
    let device_setup_proxy = DeviceSetupProxy::new(device_setup_channel);
    let (client_side, server_side) = create_endpoints::<DeviceMarker>()?;
    match device_setup_proxy.set_channel(server_side.into_channel()).await {
        Ok(_r) => Ok(client_side),
        Err(e) => Err(e.into()),
    }
}
pub async fn ot_radio_set_channel ( device : & File ) -> Result < ClientEnd < DeviceMarker > , Error > { let device_setup_channel = fasync :: Channel :: from_channel ( fdio :: clone_channel ( device ) ? ) ? ; let device_setup_proxy = DeviceSetupProxy :: new ( device_setup_channel ) ; let ( client_side , server_side ) = create_endpoints :: < DeviceMarker > ( ) ? ; match device_setup_proxy . set_channel ( server_side . into_channel ( ) ) . await { Ok ( _r ) => Ok ( client_side ) , Err ( e ) => Err ( e . into ( ) ) , } }
Connect to driver and pass a FIDL channel which talks Device protocol
Connect to driver and pass a FIDL channel which talks Device protocol
device
&File
device
&File