[][src]Struct bluetooth_hci::host::ConnectionIntervalBuilder

pub struct ConnectionIntervalBuilder { /* fields omitted */ }

Intermediate builder for the ConnectionInterval.

Implementations

impl ConnectionIntervalBuilder[src]

pub fn new() -> ConnectionIntervalBuilder[src]

Initializes a new builder.

pub fn with_range(
    &mut self,
    min: Duration,
    max: Duration
) -> &mut ConnectionIntervalBuilder
[src]

Sets the connection interval range.

Errors

There are no errors from this function, but it may cause errors in build if:

  • min is greater than max
  • Either min or max is less than 7.5 ms or more than 4 seconds.
  • max leads to an invalid relative supervision timeout.

pub fn with_latency(&mut self, latency: u16) -> &mut ConnectionIntervalBuilder[src]

Sets the connection latency.

Errors

There are no errors from this function, but it may cause errors in build if:

  • latency is 500 or greater.
  • latency leads to an invalid relative supervision timeout.

pub fn with_supervision_timeout(
    &mut self,
    timeout: Duration
) -> &mut ConnectionIntervalBuilder
[src]

Sets the supervision timeout.

Errors

There are no errors from this function, but it may cause errors in build if:

  • timeout less than 100 ms or greater than 32 seconds
  • timeout results in an invalid relative supervision timeout.

pub fn build(&self) -> Result<ConnectionInterval, ConnectionIntervalError>[src]

Builds the connection interval if all parameters are valid.

Errors

Trait Implementations

impl Default for ConnectionIntervalBuilder[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.