[][src]Struct bluetooth_hci::host::ConnectionInterval

pub struct ConnectionInterval { /* fields omitted */ }

Define a connection interval range with its latency and supervision timeout. This value is passed to the controller, which determines the actual connection interval.

Implementations

impl ConnectionInterval[src]

pub fn interval(&self) -> (Duration, Duration)[src]

Returns the connection interval.

pub fn conn_latency(&self) -> u16[src]

Returns the connection latency, in number of events.

pub fn supervision_timeout(&self) -> Duration[src]

Returns the supervision timeout.

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

Serializes the connection interval into the given byte buffer.

The interval is serialized as:

  • The minimum interval value, appropriately converted (2 bytes)
  • The maximum interval value, appropriately converted (2 bytes)
  • The connection latency (2 bytes)
  • The supervision timeout, appropriately converted (2 bytes)

Panics

The provided buffer must be at least 8 bytes long.

pub fn from_bytes(bytes: &[u8]) -> Result<Self, ConnectionIntervalError>[src]

Deserializes the connection interval from the given byte buffer.

  • The minimum interval value, appropriately converted (2 bytes)
  • The maximum interval value, appropriately converted (2 bytes)
  • The connection latency (2 bytes)
  • The supervision timeout, appropriately converted (2 bytes)

Panics

The provided buffer must be at least 8 bytes long.

Errors

Any of the errors from the builder except for Incomplete.

Trait Implementations

impl Clone for ConnectionInterval[src]

impl Copy for ConnectionInterval[src]

impl Debug for ConnectionInterval[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.