Struct bluetooth_hci::types::AdvertisingIntervalBuilder [−][src]
pub struct AdvertisingIntervalBuilder { /* fields omitted */ }Partially-specified advertising interval.
Methods
impl AdvertisingIntervalBuilder[src]
impl AdvertisingIntervalBuilderpub fn with_range(
&self,
min: Duration,
max: Duration
) -> Result<AdvertisingInterval, AdvertisingIntervalError>[src]
pub fn with_range(
&self,
min: Duration,
max: Duration
) -> Result<AdvertisingInterval, AdvertisingIntervalError>Completes the advertising interval with the provided minimum and maximum values.
Errors
- TooShort if the minimum value is too small. For Bluetooth specifications v4.x, if the advertising type is ScannableUndirected, then the minimum value is 100 ms. In all other cases, the minimum value is 20 ms.
- TooLong if the maximum value is too large. The maximum value is 10.24 seconds.
- Inverted if the minimum is greater than the maximum.
pub fn build(&self) -> Result<AdvertisingInterval, AdvertisingIntervalError>[src]
pub fn build(&self) -> Result<AdvertisingInterval, AdvertisingIntervalError>Completes the advertising interval without a range.
This is only valid if the advertising type is ScannableUndirected.
Errors
- NoRange if the advertising type is anything except ConnectableDirectedHighDutyCycle.
Auto Trait Implementations
impl Send for AdvertisingIntervalBuilder
impl Send for AdvertisingIntervalBuilderimpl Sync for AdvertisingIntervalBuilder
impl Sync for AdvertisingIntervalBuilder