pub struct FixedConnectionInterval { /* private fields */ }
Expand description
Define a connection interval with its latency and supervision timeout. This value is returned from the controller.
Implementations§
Source§impl FixedConnectionInterval
impl FixedConnectionInterval
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, ConnectionIntervalError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, ConnectionIntervalError>
Deserializes the connection interval from the given byte buffer.
- The 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 6 bytes long.
§Errors
Any of the errors from the builder except for Incomplete.
Sourcepub fn conn_latency(&self) -> u16
pub fn conn_latency(&self) -> u16
Returns the connection latency, in number of events.
Sourcepub fn supervision_timeout(&self) -> Duration
pub fn supervision_timeout(&self) -> Duration
Returns the supervision timeout.
Trait Implementations§
Source§impl Clone for FixedConnectionInterval
impl Clone for FixedConnectionInterval
Source§fn clone(&self) -> FixedConnectionInterval
fn clone(&self) -> FixedConnectionInterval
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 FixedConnectionInterval
impl Debug for FixedConnectionInterval
impl Copy for FixedConnectionInterval
Auto Trait Implementations§
impl Freeze for FixedConnectionInterval
impl RefUnwindSafe for FixedConnectionInterval
impl Send for FixedConnectionInterval
impl Sync for FixedConnectionInterval
impl Unpin for FixedConnectionInterval
impl UnwindSafe for FixedConnectionInterval
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