[−][src]Struct bluetooth_hci::host::ConnectionInterval
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]
fn clone(&self) -> ConnectionInterval
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,