pub struct Adapter { /* private fields */ }Implementations§
Source§impl Adapter
impl Adapter
pub fn bluetooth_enabled() -> Result<bool, Error>
pub fn get_adapters() -> Result<Vec<Adapter>, Error>
pub fn initialized(&self) -> Result<bool, Error>
pub fn identifier(&self) -> Result<String, Error>
pub fn address(&self) -> Result<String, Error>
pub fn power_on(&self) -> Result<(), Error>
pub fn power_off(&self) -> Result<(), Error>
pub fn is_powered(&self) -> Result<bool, Error>
pub fn scan_start(&self) -> Result<(), Error>
pub fn scan_stop(&self) -> Result<(), Error>
pub fn scan_for(&self, timeout_ms: i32) -> Result<(), Error>
pub fn scan_is_active(&self) -> Result<bool, Error>
pub fn scan_get_results(&self) -> Result<Vec<Peripheral>, Error>
pub fn get_paired_peripherals(&self) -> Result<Vec<Peripheral>, Error>
pub fn get_connected_peripherals(&self) -> Result<Vec<Peripheral>, Error>
pub fn on_scan_event(&self) -> impl Stream<Item = Result<ScanEvent, Error>>
pub fn on_power_event(&self) -> impl Stream<Item = Result<PowerEvent, Error>>
Trait Implementations§
impl Send for Adapter
impl Sync for Adapter
Auto Trait Implementations§
impl Freeze for Adapter
impl RefUnwindSafe for Adapter
impl Unpin for Adapter
impl UnsafeUnpin for Adapter
impl UnwindSafe for Adapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more