[−][src]Struct rubble::beacon::BeaconScanner
A passive scanner for non-connectable beacon advertisements.
Methods
impl<C: ScanCallback> BeaconScanner<C, AllowAll>
[src]
pub fn new(callback: C) -> Self
[src]
Creates a BeaconScanner
that will report beacons from any device.
impl<C: ScanCallback, F: AddressFilter> BeaconScanner<C, F>
[src]
pub fn with_filter(callback: C, scan_filter: F) -> Self
[src]
Creates a BeaconScanner
with a custom device filter.
pub fn configure(&mut self, now: Instant, interval: Duration) -> Cmd
[src]
Configures the BeaconScanner
and returns a Cmd
to apply to the radio.
The next_update
field of the returned Cmd
specifies when to call timer_update
the next
time. The timer used for this does not have to be very accurate, it is only used to switch
to the next advertising channel after interval
elapses.
pub fn timer_update(&mut self, now: Instant) -> Cmd
[src]
Updates the BeaconScanner
after the configured timer has fired.
This switches to the next advertising channel and will listen there.
pub fn process_adv_packet(
&mut self,
header: Header,
payload: &[u8],
crc_ok: bool
) -> Cmd
[src]
&mut self,
header: Header,
payload: &[u8],
crc_ok: bool
) -> Cmd
Processes a received advertising channel packet.
This should be called whenever the radio receives a packet on the configured advertising channel.
Auto Trait Implementations
impl<C, F> Send for BeaconScanner<C, F> where
C: Send,
F: Send,
C: Send,
F: Send,
impl<C, F> Sync for BeaconScanner<C, F> where
C: Sync,
F: Sync,
C: Sync,
F: Sync,
Blanket Implementations
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,