pub struct LmpFeatures(/* private fields */);
Expand description
See the Bluetooth Specification, v4.1 or later, Vol 2, Part C, Section 3.3 (Table 3.2).
Implementations§
Source§impl LmpFeatures
impl LmpFeatures
Sourcepub const THREE_SLOT_PACKETS: Self
pub const THREE_SLOT_PACKETS: Self
3-slot packets
Sourcepub const FIVE_SLOT_PACKETS: Self
pub const FIVE_SLOT_PACKETS: Self
5-slot packets
Sourcepub const ENCRYPTION: Self
pub const ENCRYPTION: Self
Encryption
Sourcepub const SLOT_OFFSET: Self
pub const SLOT_OFFSET: Self
Slot offset
Sourcepub const TIMING_ACCURACY: Self
pub const TIMING_ACCURACY: Self
Timing accuracy
Sourcepub const ROLE_SWITCH: Self
pub const ROLE_SWITCH: Self
Role switch
Sourcepub const SNIFF_MODE: Self
pub const SNIFF_MODE: Self
Sniff mode
Sourcepub const POWER_CONTROL_REQUESTS: Self
pub const POWER_CONTROL_REQUESTS: Self
Power control requests
Sourcepub const CHANNEL_QUALITY_DRIVEN_DATA_RATE_CQDDR: Self
pub const CHANNEL_QUALITY_DRIVEN_DATA_RATE_CQDDR: Self
Channel quality driven data rate (CQDDR)
Sourcepub const HV2_PACKETS: Self
pub const HV2_PACKETS: Self
HV2 packets
Sourcepub const HV3_PACKETS: Self
pub const HV3_PACKETS: Self
HV3 packets
Sourcepub const MU_LAW_LOG_SYNCHRONOUS_DATA: Self
pub const MU_LAW_LOG_SYNCHRONOUS_DATA: Self
μ-law log synchronous data
Sourcepub const A_LAW_LOG_SYNCHRONOUS_DATA: Self
pub const A_LAW_LOG_SYNCHRONOUS_DATA: Self
A-law log synchronous data
Sourcepub const CVSD_SYNCHRONOUS_DATA: Self
pub const CVSD_SYNCHRONOUS_DATA: Self
CVSD synchronous data
Sourcepub const PAGING_PARAMETER_NEGOTIATION: Self
pub const PAGING_PARAMETER_NEGOTIATION: Self
Paging parameter negotiation
Sourcepub const POWER_CONTROL: Self
pub const POWER_CONTROL: Self
Power control
Sourcepub const TRANSPARENT_SYNCHRONOUS_DATA: Self
pub const TRANSPARENT_SYNCHRONOUS_DATA: Self
Transparent synchronous data
Sourcepub const FLOW_CONTROL_LAG_LSB: Self
pub const FLOW_CONTROL_LAG_LSB: Self
Flow control lag (least significant bit)
Sourcepub const FLOW_CONTROL_LAG_MID: Self
pub const FLOW_CONTROL_LAG_MID: Self
Flow control lag (middle bit)
Sourcepub const FLOW_CONTROL_LAG_MSB: Self
pub const FLOW_CONTROL_LAG_MSB: Self
Flow control lag (most significant bit)
Sourcepub const BROADCAST_ENCRYPTION: Self
pub const BROADCAST_ENCRYPTION: Self
Broadcast Encryption
Sourcepub const ENHANCED_DATA_RATE_ACL_2_MB_PER_S_MODE: Self
pub const ENHANCED_DATA_RATE_ACL_2_MB_PER_S_MODE: Self
Enhanced Data Rate ACL 2 Mb/s mode
Sourcepub const ENHANCED_DATA_RATE_ACL_3_MB_PER_S_MODE: Self
pub const ENHANCED_DATA_RATE_ACL_3_MB_PER_S_MODE: Self
Enhanced Data Rate ACL 3 Mb/s mode
Sourcepub const ENHANCED_INQUIRY_SCAN: Self
pub const ENHANCED_INQUIRY_SCAN: Self
Enhanced inquiry scan
Sourcepub const INTERLACED_INQUIRY_SCAN: Self
pub const INTERLACED_INQUIRY_SCAN: Self
Interlaced inquiry scan
Sourcepub const INTERLACED_PAGE_SCAN: Self
pub const INTERLACED_PAGE_SCAN: Self
Interlaced page scan
Sourcepub const RSSI_WITH_INQUIRY_RESULTS: Self
pub const RSSI_WITH_INQUIRY_RESULTS: Self
RSSI with inquiry results
Sourcepub const EXTENDED_SCO_LINK_EV3_PACKETS: Self
pub const EXTENDED_SCO_LINK_EV3_PACKETS: Self
Extended SCO link (EV3 packets)
Sourcepub const EV4_PACKETS: Self
pub const EV4_PACKETS: Self
EV4 packets
Sourcepub const EV5_PACKETS: Self
pub const EV5_PACKETS: Self
EV5 packets
Sourcepub const AFH_CAPABLE_PERIPHERAL: Self
pub const AFH_CAPABLE_PERIPHERAL: Self
AFH capable peripheral
Sourcepub const AFH_CLASSIFICATION_PERIPHERAL: Self
pub const AFH_CLASSIFICATION_PERIPHERAL: Self
AFH classification peripheral
Sourcepub const BR_EDR_NOT_SUPPORTED: Self
pub const BR_EDR_NOT_SUPPORTED: Self
BR/EDR Not Supported
Sourcepub const LE_SUPPORTED_BY_CONTROLLER: Self
pub const LE_SUPPORTED_BY_CONTROLLER: Self
LE Supported (Controller)
Sourcepub const THREE_SLOT_ENHANCED_DATA_RATE_ACL_PACKETS: Self
pub const THREE_SLOT_ENHANCED_DATA_RATE_ACL_PACKETS: Self
3-slot Enhanced Data Rate ACL packets
Sourcepub const FIVE_SLOT_ENHANCED_DATA_RATE_ACL_PACKETS: Self
pub const FIVE_SLOT_ENHANCED_DATA_RATE_ACL_PACKETS: Self
5-slot Enhanced Data Rate ACL packets
Sourcepub const SNIFF_SUBRATING: Self
pub const SNIFF_SUBRATING: Self
Sniff subrating
Sourcepub const PAUSE_ENCRYPTION: Self
pub const PAUSE_ENCRYPTION: Self
Pause encryption
Sourcepub const AFH_CAPABLE_CENTRAL_DEVICE: Self
pub const AFH_CAPABLE_CENTRAL_DEVICE: Self
AFH capable central device
Sourcepub const AFH_CLASSIFICATION_CENTRAL_DEVICE: Self
pub const AFH_CLASSIFICATION_CENTRAL_DEVICE: Self
AFH classification central device
Sourcepub const ENHANCED_DATA_RATE_ESCO_2_MB_PER_S_MODE: Self
pub const ENHANCED_DATA_RATE_ESCO_2_MB_PER_S_MODE: Self
Enhanced Data Rate eSCO 2 Mb/s mode
Sourcepub const ENHANCED_DATA_RATE_ESCO_3_MB_PER_S_MODE: Self
pub const ENHANCED_DATA_RATE_ESCO_3_MB_PER_S_MODE: Self
Enhanced Data Rate eSCO 3 Mb/s mode
Sourcepub const THREE_SLOT_ENHANCED_DATA_RATE_ESCO_PACKETS: Self
pub const THREE_SLOT_ENHANCED_DATA_RATE_ESCO_PACKETS: Self
3-slot Enhanced Data Rate eSCO packets
Sourcepub const EXTENDED_INQUIRY_RESPONSE: Self
pub const EXTENDED_INQUIRY_RESPONSE: Self
Extended Inquiry Response
Sourcepub const SIMULTANEOUS_LE_AND_BR_EDR_TO_SAME_DEVICE_CAPABLE: Self
pub const SIMULTANEOUS_LE_AND_BR_EDR_TO_SAME_DEVICE_CAPABLE: Self
Simultaneous LE and BR/EDR to Same Device Capable (Controller)
Sourcepub const SECURE_SIMPLE_PAIRING: Self
pub const SECURE_SIMPLE_PAIRING: Self
Secure Simple Pairing
Sourcepub const ENCAPSULATED_PDU: Self
pub const ENCAPSULATED_PDU: Self
Encapsulated PDU
Sourcepub const ERRONEOUS_DATA_REPORTING: Self
pub const ERRONEOUS_DATA_REPORTING: Self
Erroneous Data Reporting
Sourcepub const NON_FLUSHABLE_PACKET_BOUNDARY_FLAG: Self
pub const NON_FLUSHABLE_PACKET_BOUNDARY_FLAG: Self
Non-flushable Packet Boundary Flag
Sourcepub const LINK_SUPERVISION_TIMEOUT_CHANGED_EVENT: Self
pub const LINK_SUPERVISION_TIMEOUT_CHANGED_EVENT: Self
Link Supervision Timeout Changed Event
Sourcepub const INQUIRY_TX_POWER_LEVEL: Self
pub const INQUIRY_TX_POWER_LEVEL: Self
Inquiry TX Power Level
Sourcepub const ENHANCED_POWER_CONTROL: Self
pub const ENHANCED_POWER_CONTROL: Self
Enhanced Power Control
Sourcepub const EXTENDED_FEATURES: Self
pub const EXTENDED_FEATURES: Self
Extended features
Source§impl LmpFeatures
impl LmpFeatures
Sourcepub const fn bits(&self) -> u64
pub const fn bits(&self) -> u64
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u64) -> Option<Self>
pub const fn from_bits(bits: u64) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u64) -> Self
pub const fn from_bits_truncate(bits: u64) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u64) -> Self
pub const fn from_bits_retain(bits: u64) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl LmpFeatures
impl LmpFeatures
Sourcepub const fn iter(&self) -> Iter<LmpFeatures>
pub const fn iter(&self) -> Iter<LmpFeatures>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<LmpFeatures>
pub const fn iter_names(&self) -> IterNames<LmpFeatures>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for LmpFeatures
impl Binary for LmpFeatures
Source§impl BitAnd for LmpFeatures
impl BitAnd for LmpFeatures
Source§impl BitAndAssign for LmpFeatures
impl BitAndAssign for LmpFeatures
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for LmpFeatures
impl BitOr for LmpFeatures
Source§fn bitor(self, other: LmpFeatures) -> Self
fn bitor(self, other: LmpFeatures) -> Self
The bitwise or (|
) of the bits in two flags values.
Source§type Output = LmpFeatures
type Output = LmpFeatures
|
operator.Source§impl BitOrAssign for LmpFeatures
impl BitOrAssign for LmpFeatures
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for LmpFeatures
impl BitXor for LmpFeatures
Source§impl BitXorAssign for LmpFeatures
impl BitXorAssign for LmpFeatures
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for LmpFeatures
impl Clone for LmpFeatures
Source§fn clone(&self) -> LmpFeatures
fn clone(&self) -> LmpFeatures
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LmpFeatures
impl Debug for LmpFeatures
Source§impl Default for LmpFeatures
impl Default for LmpFeatures
Source§fn default() -> LmpFeatures
fn default() -> LmpFeatures
Source§impl Extend<LmpFeatures> for LmpFeatures
impl Extend<LmpFeatures> for LmpFeatures
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl Flags for LmpFeatures
impl Flags for LmpFeatures
Source§const FLAGS: &'static [Flag<LmpFeatures>]
const FLAGS: &'static [Flag<LmpFeatures>]
Source§fn from_bits_retain(bits: u64) -> LmpFeatures
fn from_bits_retain(bits: u64) -> LmpFeatures
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true
if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl FromIterator<LmpFeatures> for LmpFeatures
impl FromIterator<LmpFeatures> for LmpFeatures
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
Source§impl IntoIterator for LmpFeatures
impl IntoIterator for LmpFeatures
Source§impl LowerHex for LmpFeatures
impl LowerHex for LmpFeatures
Source§impl Not for LmpFeatures
impl Not for LmpFeatures
Source§impl Octal for LmpFeatures
impl Octal for LmpFeatures
Source§impl PartialEq for LmpFeatures
impl PartialEq for LmpFeatures
Source§impl PublicFlags for LmpFeatures
impl PublicFlags for LmpFeatures
Source§impl Sub for LmpFeatures
impl Sub for LmpFeatures
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Source§type Output = LmpFeatures
type Output = LmpFeatures
-
operator.Source§impl SubAssign for LmpFeatures
impl SubAssign for LmpFeatures
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.