pub struct ScanWindow { /* private fields */ }
Expand description
Implementations§
Source§impl ScanWindow
impl ScanWindow
Sourcepub fn interval(&self) -> Duration
pub fn interval(&self) -> Duration
Returns the interval for the scanning window. The controller starts an LE scan every interval.
Sourcepub fn window(&self) -> Duration
pub fn window(&self) -> Duration
Returns the amount of time the controller is scanning every interval.
Sourcepub fn copy_into_slice(&self, bytes: &mut [u8])
pub fn copy_into_slice(&self, bytes: &mut [u8])
Sourcepub fn start_every(
interval: Duration,
) -> Result<ScanWindowBuilder, ScanWindowError>
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§
Source§impl Clone for ScanWindow
impl Clone for ScanWindow
Source§fn clone(&self) -> ScanWindow
fn clone(&self) -> ScanWindow
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ScanWindow
impl Debug for ScanWindow
Source§impl PartialEq for ScanWindow
impl PartialEq for ScanWindow
impl StructuralPartialEq for ScanWindow
Auto Trait Implementations§
impl Freeze for ScanWindow
impl RefUnwindSafe for ScanWindow
impl Send for ScanWindow
impl Sync for ScanWindow
impl Unpin for ScanWindow
impl UnwindSafe for ScanWindow
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