Struct stm32wb_hci::types::ExpectedConnectionLength
source · pub struct ExpectedConnectionLength { /* private fields */ }Expand description
Define an expected connection length range
There is no minimum. The maximum is bounded by what is representable as a u16 at T = N * 0.625 ms, so max = 65535 * 0.625 ms = 40.959375 seconds.
Implementations§
source§impl ExpectedConnectionLength
impl ExpectedConnectionLength
sourcepub fn new(
min: Duration,
max: Duration
) -> Result<ExpectedConnectionLength, ExpectedConnectionLengthError>
pub fn new( min: Duration, max: Duration ) -> Result<ExpectedConnectionLength, ExpectedConnectionLengthError>
sourcepub fn copy_into_slice(&self, bytes: &mut [u8])
pub fn copy_into_slice(&self, bytes: &mut [u8])
Serializes the expected connection length range into the given byte buffer.
Panics
The buffer must be at least 4 bytes long.
Trait Implementations§
source§impl Clone for ExpectedConnectionLength
impl Clone for ExpectedConnectionLength
source§fn clone(&self) -> ExpectedConnectionLength
fn clone(&self) -> ExpectedConnectionLength
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 moreAuto Trait Implementations§
impl RefUnwindSafe for ExpectedConnectionLength
impl Send for ExpectedConnectionLength
impl Sync for ExpectedConnectionLength
impl Unpin for ExpectedConnectionLength
impl UnwindSafe for ExpectedConnectionLength
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