Enum LegacyAdvertisingType
#[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§
§impl LegacyAdvertisingType
impl LegacyAdvertisingType
pub fn from_primitive(prim: u8) -> Option<LegacyAdvertisingType>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl Clone for LegacyAdvertisingType
impl Clone for LegacyAdvertisingType
§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 more§impl Debug for LegacyAdvertisingType
impl Debug for LegacyAdvertisingType
§impl<D> Decode<LegacyAdvertisingType, D> for LegacyAdvertisingTypewhere
D: ResourceDialect,
impl<D> Decode<LegacyAdvertisingType, D> for LegacyAdvertisingTypewhere
D: ResourceDialect,
§fn new_empty() -> LegacyAdvertisingType
fn new_empty() -> LegacyAdvertisingType
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<LegacyAdvertisingType, D> for LegacyAdvertisingTypewhere
D: ResourceDialect,
impl<D> Encode<LegacyAdvertisingType, D> for LegacyAdvertisingTypewhere
D: ResourceDialect,
§impl Hash for LegacyAdvertisingType
impl Hash for LegacyAdvertisingType
§impl Ord for LegacyAdvertisingType
impl Ord for LegacyAdvertisingType
§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
§impl PartialEq for LegacyAdvertisingType
impl PartialEq for LegacyAdvertisingType
§impl PartialOrd for LegacyAdvertisingType
impl PartialOrd for LegacyAdvertisingType
§impl TypeMarker for LegacyAdvertisingType
impl TypeMarker for LegacyAdvertisingType
§type Owned = LegacyAdvertisingType
type Owned = LegacyAdvertisingType
The owned Rust type which this FIDL type decodes into.
§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.
§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
.§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 more§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.§impl ValueTypeMarker for LegacyAdvertisingType
impl ValueTypeMarker for LegacyAdvertisingType
§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 more§fn borrow(
value: &<LegacyAdvertisingType as TypeMarker>::Owned,
) -> <LegacyAdvertisingType as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<LegacyAdvertisingType as TypeMarker>::Owned, ) -> <LegacyAdvertisingType as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl 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