Struct bluenrg::gap::ScanWindow [−][src]
pub struct ScanWindow { /* fields omitted */ }
Define a scanning window.
The controller runs LE scans every interval
, with scanning active
during the window
in every interval.
The minimum time range is 2.5 ms, and the maximum is 10.24 s. The window must be shorter than or equal to the interval.
Methods
impl ScanWindow
[src]
impl ScanWindow
pub fn interval(&self) -> Duration
[src]
pub fn interval(&self) -> Duration
Returns the interval for the scanning window. The controller starts an LE scan every interval.
pub fn window(&self) -> Duration
[src]
pub fn window(&self) -> Duration
Returns the amount of time the controller is scanning every interval.
pub fn into_bytes(&self, bytes: &mut [u8])
[src]
pub fn into_bytes(&self, bytes: &mut [u8])
pub fn start_every(
interval: Duration
) -> Result<ScanWindowBuilder, ScanWindowError>
[src]
pub fn start_every(
interval: Duration
) -> Result<ScanWindowBuilder, ScanWindowError>
Begins building a ScanWindow. The scan window has the given interval. Returns a builder that can be used to set the window duration.
Errors
- [ScanWindowError::TooShort] if the provided interval is too short. It must be at least 2.5 ms.
- [ScanWindowError::TooLong] if the provided interval is too long. It must be 10.24 seconds or less.
Trait Implementations
impl Debug for ScanWindow
[src]
impl Debug for ScanWindow
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Clone for ScanWindow
[src]
impl Clone for ScanWindow
fn clone(&self) -> ScanWindow
[src]
fn clone(&self) -> ScanWindow
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for ScanWindow
impl Send for ScanWindow
impl Sync for ScanWindow
impl Sync for ScanWindow