pub trait AsyncBluetoothAdapterTrait {
// Required methods
fn register_rfcomm_profile<'life0, 'async_trait>(
&'life0 self,
settings: BluetoothRfcommProfileSettings,
) -> Pin<Box<dyn Future<Output = Result<BluetoothRfcommProfileAsync, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_l2cap_profile<'life0, 'async_trait>(
&'life0 self,
settings: BluetoothL2capProfileSettings,
) -> Pin<Box<dyn Future<Output = Result<BluetoothL2capProfileAsync, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_paired_devices(&self) -> Option<Vec<BluetoothDevice>>;
fn start_discovery(&self) -> BluetoothDiscovery;
fn addresses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<BluetoothAdapterAddress>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_discoverable<'life0, 'async_trait>(
&'life0 self,
d: bool,
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Common async functionality for the bluetooth adapter
Required Methods§
Sourcefn register_rfcomm_profile<'life0, 'async_trait>(
&'life0 self,
settings: BluetoothRfcommProfileSettings,
) -> Pin<Box<dyn Future<Output = Result<BluetoothRfcommProfileAsync, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_rfcomm_profile<'life0, 'async_trait>(
&'life0 self,
settings: BluetoothRfcommProfileSettings,
) -> Pin<Box<dyn Future<Output = Result<BluetoothRfcommProfileAsync, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Attempt to register a new rfcomm profile
Sourcefn register_l2cap_profile<'life0, 'async_trait>(
&'life0 self,
settings: BluetoothL2capProfileSettings,
) -> Pin<Box<dyn Future<Output = Result<BluetoothL2capProfileAsync, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_l2cap_profile<'life0, 'async_trait>(
&'life0 self,
settings: BluetoothL2capProfileSettings,
) -> Pin<Box<dyn Future<Output = Result<BluetoothL2capProfileAsync, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Attempt to register a new l2cap profile
Sourcefn get_paired_devices(&self) -> Option<Vec<BluetoothDevice>>
fn get_paired_devices(&self) -> Option<Vec<BluetoothDevice>>
Get a list of paired bluetooth devices
Sourcefn start_discovery(&self) -> BluetoothDiscovery
fn start_discovery(&self) -> BluetoothDiscovery
Start discovery of bluetooth devices. Run this and drop the result to cancel discovery