[][src]Struct bluetooth_hci::host::ExpectedConnectionLength

pub struct ExpectedConnectionLength { /* fields omitted */ }

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

impl ExpectedConnectionLength[src]

pub fn new(
    min: Duration,
    max: Duration
) -> Result<ExpectedConnectionLength, ExpectedConnectionLengthError>
[src]

Creates a new ExpectedConnectionLength, or returns an error if the duration is invalid.

Errors

  • Inverted if min is greater than max
  • TooLong if max is longer than 40.959375 seconds.

pub fn copy_into_slice(&self, bytes: &mut [u8])[src]

Serializes the expected connection length range into the given byte buffer.

Panics

The buffer must be at least 4 bytes long.

Trait Implementations

impl Clone for ExpectedConnectionLength[src]

impl Debug for ExpectedConnectionLength[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.