#[repr(u8)]pub enum AdvertisingModeHint {
VeryFast = 1,
Fast = 2,
Slow = 3,
}
Expand description
A client can indicate the transmission rate of advertising packets by specifying a mode. The mode provides a hint to the system when configuring the controller with advertising interval and window parameters.
The mode affects how quickly a scanner or central is able to discover the peripheral; however it can have an adverse effect on power consumption. While the system will try to honor a client’s request, it is not guaranteed to do so.
Variants§
VeryFast = 1
Advertise with a very short interval and window for fast discovery at the cost of higher power consumption. This corresponds to a 30-60ms interval on the 1M PHYs and 90-180ms on the coded PHY.
Fast = 2
Advertise with a short interval and window that uses less power than VERY_FAST
.
This corresponds to a 100-150ms interval on the 1M PHYs and 300-450ms on the coded PHY.
Slow = 3
Advertise with a moderate interval and window. This corresponds to 1-1.2s on the 1M PHYs and 3s on the coded PHY.
Implementations§
Source§impl AdvertisingModeHint
impl AdvertisingModeHint
pub fn from_primitive(prim: u8) -> Option<Self>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
Source§impl Clone for AdvertisingModeHint
impl Clone for AdvertisingModeHint
Source§fn clone(&self) -> AdvertisingModeHint
fn clone(&self) -> AdvertisingModeHint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AdvertisingModeHint
impl Debug for AdvertisingModeHint
Source§impl<D: ResourceDialect> Decode<AdvertisingModeHint, D> for AdvertisingModeHint
impl<D: ResourceDialect> Decode<AdvertisingModeHint, D> for AdvertisingModeHint
Source§impl<D: ResourceDialect> Encode<AdvertisingModeHint, D> for AdvertisingModeHint
impl<D: ResourceDialect> Encode<AdvertisingModeHint, D> for AdvertisingModeHint
Source§impl Hash for AdvertisingModeHint
impl Hash for AdvertisingModeHint
Source§impl Ord for AdvertisingModeHint
impl Ord for AdvertisingModeHint
Source§fn cmp(&self, other: &AdvertisingModeHint) -> Ordering
fn cmp(&self, other: &AdvertisingModeHint) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AdvertisingModeHint
impl PartialEq for AdvertisingModeHint
Source§impl PartialOrd for AdvertisingModeHint
impl PartialOrd for AdvertisingModeHint
Source§impl TypeMarker for AdvertisingModeHint
impl TypeMarker for AdvertisingModeHint
Source§type Owned = AdvertisingModeHint
type Owned = AdvertisingModeHint
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for AdvertisingModeHint
impl ValueTypeMarker for AdvertisingModeHint
Source§type Borrowed<'a> = AdvertisingModeHint
type Borrowed<'a> = AdvertisingModeHint
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more