pub struct AdvertisingIntervalBuilder { /* private fields */ }
Expand description
Partially-specified advertising interval.
Implementations§
Source§impl AdvertisingIntervalBuilder
impl AdvertisingIntervalBuilder
Sourcepub fn with_range(
&self,
min: Duration,
max: Duration,
) -> Result<AdvertisingInterval, AdvertisingIntervalError>
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.
Sourcepub fn build(&self) -> Result<AdvertisingInterval, AdvertisingIntervalError>
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 Freeze for AdvertisingIntervalBuilder
impl RefUnwindSafe for AdvertisingIntervalBuilder
impl Send for AdvertisingIntervalBuilder
impl Sync for AdvertisingIntervalBuilder
impl Unpin for AdvertisingIntervalBuilder
impl UnwindSafe for AdvertisingIntervalBuilder
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