pub struct HciSocket { /* private fields */ }Expand description
A raw HCI socket bound to one controller.
Implementations§
Source§impl HciSocket
impl HciSocket
Sourcepub fn set_scan_parameters(&self) -> Result<(), String>
pub fn set_scan_parameters(&self) -> Result<(), String>
Passive scan, 10 ms window every 10 ms — continuous coverage.
pub fn set_scan_enable(&self, enable: bool) -> Result<(), String>
Sourcepub fn scan(
&self,
stop: Arc<AtomicBool>,
on_advertisement: impl FnMut(Advertisement),
) -> Result<(), String>
pub fn scan( &self, stop: Arc<AtomicBool>, on_advertisement: impl FnMut(Advertisement), ) -> Result<(), String>
Scan until stop is set, reporting each advertisement.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HciSocket
impl Forget for HciSocket
impl Move for HciSocket
impl RefUnwindSafe for HciSocket
impl Send for HciSocket
impl Sync for HciSocket
impl Unpin for HciSocket
impl UnsafeUnpin for HciSocket
impl UnwindSafe for HciSocket
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