Struct bluenrg::gap::ExpectedConnectionLength [−][src]
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.
Methods
impl ExpectedConnectionLength
[src]
impl ExpectedConnectionLength
pub fn new(
min: Duration,
max: Duration
) -> Result<ExpectedConnectionLength, ExpectedConnectionLengthError>
[src]
pub fn new(
min: Duration,
max: Duration
) -> Result<ExpectedConnectionLength, ExpectedConnectionLengthError>
Creates a new ExpectedConnectionLength, or returns an error if the duration is invalid.
Errors
pub fn into_bytes(&self, bytes: &mut [u8])
[src]
pub fn into_bytes(&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
impl Debug for ExpectedConnectionLength
[src]
impl Debug for ExpectedConnectionLength
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Clone for ExpectedConnectionLength
[src]
impl Clone for ExpectedConnectionLength
fn clone(&self) -> ExpectedConnectionLength
[src]
fn clone(&self) -> ExpectedConnectionLength
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for ExpectedConnectionLength
impl Send for ExpectedConnectionLength
impl Sync for ExpectedConnectionLength
impl Sync for ExpectedConnectionLength