#[repr(u8)]pub enum LegacyAdvertisingType {
AdvInd = 0,
AdvDirectInd = 1,
AdvScanInd = 2,
AdvNonconnInd = 3,
ScanRsp = 4,
}
Expand description
LE legacy advertising types from Bluetooth Core Specification v5.4, Vol 4, Part E, 7.8.5.
Variants§
AdvInd = 0
Connectable and scannable.
AdvDirectInd = 1
Connectable, high-duty cycle, directed.
AdvScanInd = 2
Scannable, undirected.
AdvNonconnInd = 3
Non-connectable, undirected
ScanRsp = 4
Scan response
Implementations§
Source§impl LegacyAdvertisingType
impl LegacyAdvertisingType
pub fn from_primitive(prim: u8) -> Option<Self>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
Source§impl Clone for LegacyAdvertisingType
impl Clone for LegacyAdvertisingType
Source§fn clone(&self) -> LegacyAdvertisingType
fn clone(&self) -> LegacyAdvertisingType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LegacyAdvertisingType
impl Debug for LegacyAdvertisingType
Source§impl<D: ResourceDialect> Decode<LegacyAdvertisingType, D> for LegacyAdvertisingType
impl<D: ResourceDialect> Decode<LegacyAdvertisingType, D> for LegacyAdvertisingType
Source§impl<D: ResourceDialect> Encode<LegacyAdvertisingType, D> for LegacyAdvertisingType
impl<D: ResourceDialect> Encode<LegacyAdvertisingType, D> for LegacyAdvertisingType
Source§impl Hash for LegacyAdvertisingType
impl Hash for LegacyAdvertisingType
Source§impl Ord for LegacyAdvertisingType
impl Ord for LegacyAdvertisingType
Source§fn cmp(&self, other: &LegacyAdvertisingType) -> Ordering
fn cmp(&self, other: &LegacyAdvertisingType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LegacyAdvertisingType
impl PartialEq for LegacyAdvertisingType
Source§impl PartialOrd for LegacyAdvertisingType
impl PartialOrd for LegacyAdvertisingType
Source§impl TypeMarker for LegacyAdvertisingType
impl TypeMarker for LegacyAdvertisingType
Source§type Owned = LegacyAdvertisingType
type Owned = LegacyAdvertisingType
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
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
Returns true if the memory layout of
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 LegacyAdvertisingType
impl ValueTypeMarker for LegacyAdvertisingType
Source§type Borrowed<'a> = LegacyAdvertisingType
type Borrowed<'a> = LegacyAdvertisingType
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for LegacyAdvertisingType
impl Eq for LegacyAdvertisingType
impl StructuralPartialEq for LegacyAdvertisingType
Auto Trait Implementations§
impl Freeze for LegacyAdvertisingType
impl RefUnwindSafe for LegacyAdvertisingType
impl Send for LegacyAdvertisingType
impl Sync for LegacyAdvertisingType
impl Unpin for LegacyAdvertisingType
impl UnwindSafe for LegacyAdvertisingType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)