pub enum ConnectionIntervalError {
Incomplete,
IntervalTooShort(Duration),
IntervalTooLong(Duration),
IntervalInverted(Duration, Duration),
BadConnectionLatency(u16),
SupervisionTimeoutTooShort(Duration, Duration),
SupervisionTimeoutTooLong(Duration),
ImpossibleSupervisionTimeout(Duration),
}
Expand description
Types of errors that can occure when creating a ConnectionInterval
.
Variants§
Incomplete
At least one of any of with_range
,
with_latency
, or
with_supervision_timeout
has not
been called.
IntervalTooShort(Duration)
The minimum range value is less than 7.5 ms. Includes the invalid value.
IntervalTooLong(Duration)
The maximum range value is greater than 4 seconds. Includes the invalid value.
IntervalInverted(Duration, Duration)
The minimum range value is greater than the maximum. Includes the provided minimum and maximum, respectively.
BadConnectionLatency(u16)
The connection latency is 500 or more. Includes the provided value.
SupervisionTimeoutTooShort(Duration, Duration)
The supervision timeout is less than 100 ms, or it is less than the computed minimum: (1 + latency) * interval max * 2. The first value is the provided timeout; the second is the required minimum.
SupervisionTimeoutTooLong(Duration)
The supervision timeout is more than 32 seconds. Includes the provided timeout.
ImpossibleSupervisionTimeout(Duration)
The computed minimum supervision timeout ((1 + latency) * interval max * 2) is 32 seconds or more. Includes the computed minimum.
Trait Implementations§
Source§impl Clone for ConnectionIntervalError
impl Clone for ConnectionIntervalError
Source§fn clone(&self) -> ConnectionIntervalError
fn clone(&self) -> ConnectionIntervalError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more