/// Represents a fake bt-init client that connects to the services it exposes.
Represents a fake bt-init client that connects to the services it exposes.
Represents a fake bt - init client that connects to the services it exposes .
async fn mock_client(
    mut sender: mpsc::Sender<Event>,
    handles: LocalComponentHandles,
) -> Result<(), Error> {
    let profile_svc = handles.connect_to_protocol::<ProfileMarker>()?;
    sender.send(Event::Profile(Some(profile_svc))).await.expect("failed sending ack to test");
    let gatt_server_svc = handles.connect_to_protocol::<fbgatt::Server_Marker>()?;
    sender
        .send(Event::GattServer(Some(gatt_server_svc)))
        .await
        .expect("failed sending ack to test");
    let le_central_svc = handles.connect_to_protocol::<fble::CentralMarker>()?;
    sender.send(Event::LeCentral(Some(le_central_svc))).await.expect("failed sending ack to test");
    let le_peripheral_svc = handles.connect_to_protocol::<fble::PeripheralMarker>()?;
    sender
        .send(Event::LePeripheral(Some(le_peripheral_svc)))
        .await
        .expect("failed sending ack to test");
    let access_svc = handles.connect_to_protocol::<AccessMarker>()?;
    sender.send(Event::Access(Some(access_svc))).await.expect("failed sending ack to test");
    let bootstrap_svc = handles.connect_to_protocol::<BootstrapMarker>()?;
    sender.send(Event::Bootstrap(Some(bootstrap_svc))).await.expect("failed sending ack to test");
    let configuration_svc = handles.connect_to_protocol::<ConfigurationMarker>()?;
    sender.send(Event::Config(Some(configuration_svc))).await.expect("failed sending ack to test");
    let host_watcher_svc = handles.connect_to_protocol::<HostWatcherMarker>()?;
    sender
        .send(Event::HostWatcher(Some(host_watcher_svc)))
        .await
        .expect("failed sending ack to test");
    let rfcomm_test_svc = handles.connect_to_protocol::<RfcommTestMarker>()?;
    sender
        .send(Event::RfcommTest(Some(rfcomm_test_svc)))
        .await
        .expect("failed sending ack to test");
    Ok(())
}
async fn mock_client ( mut sender : mpsc :: Sender < Event > , handles : LocalComponentHandles , ) -> Result < ( ) , Error > { let profile_svc = handles . connect_to_protocol :: < ProfileMarker > ( ) ? ; sender . send ( Event :: Profile ( Some ( profile_svc ) ) ) . await . expect ( " " ) ; let gatt_server_svc = handles . connect_to_protocol :: < fbgatt :: Server_Marker > ( ) ? ; sender . send ( Event :: GattServer ( Some ( gatt_server_svc ) ) ) . await . expect ( " " ) ; let le_central_svc = handles . connect_to_protocol :: < fble :: CentralMarker > ( ) ? ; sender . send ( Event :: LeCentral ( Some ( le_central_svc ) ) ) . await . expect ( " " ) ; let le_peripheral_svc = handles . connect_to_protocol :: < fble :: PeripheralMarker > ( ) ? ; sender . send ( Event :: LePeripheral ( Some ( le_peripheral_svc ) ) ) . await . expect ( " " ) ; let access_svc = handles . connect_to_protocol :: < AccessMarker > ( ) ? ; sender . send ( Event :: Access ( Some ( access_svc ) ) ) . await . expect ( " " ) ; let bootstrap_svc = handles . connect_to_protocol :: < BootstrapMarker > ( ) ? ; sender . send ( Event :: Bootstrap ( Some ( bootstrap_svc ) ) ) . await . expect ( " " ) ; let configuration_svc = handles . connect_to_protocol :: < ConfigurationMarker > ( ) ? ; sender . send ( Event :: Config ( Some ( configuration_svc ) ) ) . await . expect ( " " ) ; let host_watcher_svc = handles . connect_to_protocol :: < HostWatcherMarker > ( ) ? ; sender . send ( Event :: HostWatcher ( Some ( host_watcher_svc ) ) ) . await . expect ( " " ) ; let rfcomm_test_svc = handles . connect_to_protocol :: < RfcommTestMarker > ( ) ? ; sender . send ( Event :: RfcommTest ( Some ( rfcomm_test_svc ) ) ) . await . expect ( " " ) ; Ok ( ( ) ) }
Represents a fake bt-init client that connects to the services it exposes.
Represents a fake bt - init client that connects to the services it exposes .
sender
mpsc::Sender<Event>
handles
LocalComponentHandles