pub struct ExtendedAdvertisingInterval { /* private fields */ }
Expand description
Define an extended advertising interval range.
The advertising interval min shall be less than or equal to the advertising interval max. The advertising interval min and advertising interval max should not be the same values to enable the Controller to determine the best advertising interval given other adctivities, through this implementation allows them to be equal.
Implementations§
Source§impl ExtendedAdvertisingInterval
impl ExtendedAdvertisingInterval
Sourcepub fn with_range(
min: Duration,
max: Duration,
) -> Result<Self, ExtendedAdvertisingIntervalError>
pub fn with_range( min: Duration, max: Duration, ) -> Result<Self, ExtendedAdvertisingIntervalError>
Creates an 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 copy_into_slice(&self, bytes: &mut [u8])
pub fn copy_into_slice(&self, bytes: &mut [u8])
Serialize the interval into the given buffer.
Serializes the minimum range of the interval (4 bytes), the maximum range of the interval (4 bytees)
§Panics
- If the provided buffer is not at least 8 bytes long.
Auto Trait Implementations§
impl Freeze for ExtendedAdvertisingInterval
impl RefUnwindSafe for ExtendedAdvertisingInterval
impl Send for ExtendedAdvertisingInterval
impl Sync for ExtendedAdvertisingInterval
impl Unpin for ExtendedAdvertisingInterval
impl UnwindSafe for ExtendedAdvertisingInterval
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