#[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<AdvertisingModeHint>
pub const fn into_primitive(self) -> u8
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> Decode<AdvertisingModeHint, D> for AdvertisingModeHintwhere
    D: ResourceDialect,
 
impl<D> Decode<AdvertisingModeHint, D> for AdvertisingModeHintwhere
    D: ResourceDialect,
Source§fn new_empty() -> AdvertisingModeHint
 
fn new_empty() -> AdvertisingModeHint
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<AdvertisingModeHint, D> for AdvertisingModeHintwhere
    D: ResourceDialect,
 
impl<D> Encode<AdvertisingModeHint, D> for AdvertisingModeHintwhere
    D: ResourceDialect,
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 moreSource§fn borrow(
    value: &<AdvertisingModeHint as TypeMarker>::Owned,
) -> <AdvertisingModeHint as ValueTypeMarker>::Borrowed<'_>
 
fn borrow( value: &<AdvertisingModeHint as TypeMarker>::Owned, ) -> <AdvertisingModeHint as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.