pub trait AdvertSource: Send + Sync {
// Provided method
fn watch_adverts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<RawAdvert>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
A source of continuous BLE advertisements, used post-pairing to receive
sleepy-device events with no active connection. Separate from
GattConnection (the connected I/O seam) so each has one responsibility.
Backends without a scanner return an immediately-closed receiver.
Provided Methods§
Sourcefn watch_adverts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<RawAdvert>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_adverts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<RawAdvert>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream Apple HAP advertisements as they arrive.
§Errors
Returns crate::error::BleError on backend scanner failures.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".