pub trait BluetoothAdapterTrait {
// Required methods
async fn register_rfcomm_profile(
&self,
settings: BluetoothRfcommProfileSettings,
) -> Result<BluetoothRfcommProfile, String>;
fn get_paired_devices(&mut self) -> Option<Vec<BluetoothDevice>>;
fn start_discovery(&mut self) -> BluetoothDiscovery<'_>;
}Expand description
Common functionality for the bluetooth adapter
Required Methods§
Sourceasync fn register_rfcomm_profile(
&self,
settings: BluetoothRfcommProfileSettings,
) -> Result<BluetoothRfcommProfile, String>
async fn register_rfcomm_profile( &self, settings: BluetoothRfcommProfileSettings, ) -> Result<BluetoothRfcommProfile, String>
Attempt to register a new rfcomm profile
Sourcefn get_paired_devices(&mut self) -> Option<Vec<BluetoothDevice>>
fn get_paired_devices(&mut self) -> Option<Vec<BluetoothDevice>>
Get a list of paired bluetooth devices
Sourcefn start_discovery(&mut self) -> BluetoothDiscovery<'_>
fn start_discovery(&mut self) -> BluetoothDiscovery<'_>
Start discovery of bluetooth devices. Run this and drop the result to cancel discovery
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.