pub struct Scanner { /* private fields */ }
Implementations§
Source§impl Scanner
impl Scanner
pub fn new() -> Self
Sourcepub async fn start(&mut self, config: ScanConfig) -> Result<(), Error>
pub async fn start(&mut self, config: ScanConfig) -> Result<(), Error>
Start scanning for ble devices.
Sourcepub fn device_event_stream(
&self,
) -> Result<Valved<Pin<Box<dyn Stream<Item = DeviceEvent> + Send>>>, Error>
pub fn device_event_stream( &self, ) -> Result<Valved<Pin<Box<dyn Stream<Item = DeviceEvent> + Send>>>, Error>
Create a new stream that receives ble device events.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scanner
impl !RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl !UnwindSafe for Scanner
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