Trait btleplug::api::Manager [−][src]
pub trait Manager { type Adapter: Central; fn adapters<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Adapter>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; }
Expand description
The Manager is the entry point to the library, providing access to all the Bluetooth adapters on
the system. You can obtain an instance from platform::Manager::new()
.
Usage
use btleplug::api::Manager as _; use btleplug::platform::Manager; let manager = Manager::new().await?; let adapter_list = manager.adapters().await?; if adapter_list.is_empty() { eprintln!("No Bluetooth adapters"); }