pub struct EventFlags(/* private fields */);
Expand description
Event flags defined for the set_event_mask
command.
Implementations§
Source§impl EventFlags
impl EventFlags
Sourcepub const INQUIRY_COMPLETE: Self
pub const INQUIRY_COMPLETE: Self
Inquiry complete event
Sourcepub const INQUIRY_RESULT: Self
pub const INQUIRY_RESULT: Self
Inquiry result event
Sourcepub const CONNECTION_COMPLETE: Self
pub const CONNECTION_COMPLETE: Self
Connection complete event
Sourcepub const CONNECTION_REQUEST: Self
pub const CONNECTION_REQUEST: Self
Connection request event
Sourcepub const DISCONNECTION_COMPLETE: Self
pub const DISCONNECTION_COMPLETE: Self
Disconnection complete event
Sourcepub const AUTHENTICATION_COMPLETE: Self
pub const AUTHENTICATION_COMPLETE: Self
Authentication complete event
Sourcepub const REMOTE_NAME_REQUEST_COMPLETE: Self
pub const REMOTE_NAME_REQUEST_COMPLETE: Self
Remote name request complete event
Sourcepub const ENCRYPTION_CHANGE: Self
pub const ENCRYPTION_CHANGE: Self
Encryption change event
Sourcepub const CHANGE_CONNECTION_LINK_KEY_COMPLETE: Self
pub const CHANGE_CONNECTION_LINK_KEY_COMPLETE: Self
Change connection link key complete event
Sourcepub const MASTER_LINK_KEY_COMPLETE: Self
pub const MASTER_LINK_KEY_COMPLETE: Self
Master link key complete event
Sourcepub const READ_REMOTE_SUPPORTED_FEATURES_COMPLETE: Self
pub const READ_REMOTE_SUPPORTED_FEATURES_COMPLETE: Self
Read remote supported features complete event
Sourcepub const READ_REMOTE_VERSION_INFORMATION_COMPLETE: Self
pub const READ_REMOTE_VERSION_INFORMATION_COMPLETE: Self
Read remote version information complete event
Sourcepub const QOS_SETUP_COMPLETE: Self
pub const QOS_SETUP_COMPLETE: Self
Qos setup complete event
Sourcepub const HARDWARE_ERROR: Self
pub const HARDWARE_ERROR: Self
Hardware error event
Sourcepub const FLUSH_OCCURRED: Self
pub const FLUSH_OCCURRED: Self
Flush occurred event
Sourcepub const ROLE_CHANGE: Self
pub const ROLE_CHANGE: Self
Role change event
Sourcepub const MODE_CHANGE: Self
pub const MODE_CHANGE: Self
Mode change event
Sourcepub const RETURN_LINK_KEYS: Self
pub const RETURN_LINK_KEYS: Self
Return link keys event
Sourcepub const PIN_CODE_REQUEST: Self
pub const PIN_CODE_REQUEST: Self
Pin code request event
Sourcepub const LINK_KEY_REQUEST: Self
pub const LINK_KEY_REQUEST: Self
Link key request event
Sourcepub const LINK_KEY_NOTIFICATION: Self
pub const LINK_KEY_NOTIFICATION: Self
Link key notification event
Sourcepub const LOOPBACK_COMMAND: Self
pub const LOOPBACK_COMMAND: Self
Loopback command event
Sourcepub const DATA_BUFFER_OVERFLOW: Self
pub const DATA_BUFFER_OVERFLOW: Self
Data buffer overflow event
Sourcepub const MAX_SLOTS_CHANGE: Self
pub const MAX_SLOTS_CHANGE: Self
Max slots change event
Sourcepub const READ_CLOCK_OFFSET_COMPLETE: Self
pub const READ_CLOCK_OFFSET_COMPLETE: Self
Read clock offset complete event
Sourcepub const CONNECTION_PACKET_TYPE_CHANGED: Self
pub const CONNECTION_PACKET_TYPE_CHANGED: Self
Connection packet type changed event
Sourcepub const QOS_VIOLATION: Self
pub const QOS_VIOLATION: Self
Qos violation event
Sourcepub const PAGE_SCAN_MODE_CHANGE: Self
👎Deprecated
pub const PAGE_SCAN_MODE_CHANGE: Self
Page scan mode change event. Deprecated in Bluetooth spec.
Sourcepub const PAGE_SCAN_REPETITION_MODE_CHANGE: Self
pub const PAGE_SCAN_REPETITION_MODE_CHANGE: Self
Page scan repetition mode change event
Sourcepub const FLOW_SPECIFICATION_COMPLETE: Self
pub const FLOW_SPECIFICATION_COMPLETE: Self
Flow specification complete event
Sourcepub const INQUIRY_RESULT_WITH_RSSI: Self
pub const INQUIRY_RESULT_WITH_RSSI: Self
Inquiry result with rssi event
Sourcepub const READ_REMOTE_EXTENDED_FEATURES_COMPLETE: Self
pub const READ_REMOTE_EXTENDED_FEATURES_COMPLETE: Self
Read remote extended features complete event
Sourcepub const SYNCHRONOUS_CONNECTION_COMPLETE: Self
pub const SYNCHRONOUS_CONNECTION_COMPLETE: Self
Synchronous connection complete event
Sourcepub const SYNCHRONOUS_CONNECTION_CHANGED: Self
pub const SYNCHRONOUS_CONNECTION_CHANGED: Self
Synchronous connection changed event
Sourcepub const SNIFF_SUBRATING: Self
pub const SNIFF_SUBRATING: Self
Sniff subrating event
Sourcepub const EXTENDED_INQUIRY_RESULT: Self
pub const EXTENDED_INQUIRY_RESULT: Self
Extended inquiry result event
Sourcepub const ENCRYPTION_KEY_REFRESH_COMPLETE: Self
pub const ENCRYPTION_KEY_REFRESH_COMPLETE: Self
Encryption key refresh complete event
Sourcepub const IO_CAPABILITY_REQUEST: Self
pub const IO_CAPABILITY_REQUEST: Self
Io capability request event
Sourcepub const IO_CAPABILITY_REQUEST_REPLY: Self
pub const IO_CAPABILITY_REQUEST_REPLY: Self
Io capability request reply event
Sourcepub const USER_CONFIRMATION_REQUEST: Self
pub const USER_CONFIRMATION_REQUEST: Self
User confirmation request event
Sourcepub const USER_PASSKEY_REQUEST: Self
pub const USER_PASSKEY_REQUEST: Self
User passkey request event
Sourcepub const REMOTE_OOB_DATA_REQUEST: Self
pub const REMOTE_OOB_DATA_REQUEST: Self
Remote oob data request event
Sourcepub const SIMPLE_PAIRING_COMPLETE: Self
pub const SIMPLE_PAIRING_COMPLETE: Self
Simple pairing complete event
Sourcepub const LINK_SUPERVISION_TIMEOUT_CHANGED: Self
pub const LINK_SUPERVISION_TIMEOUT_CHANGED: Self
Link supervision timeout changed event
Sourcepub const ENHANCED_FLUSH_COMPLETE: Self
pub const ENHANCED_FLUSH_COMPLETE: Self
Enhanced flush complete event
Sourcepub const USER_PASSKEY_NOTIFICATION: Self
pub const USER_PASSKEY_NOTIFICATION: Self
User passkey notification event
Sourcepub const KEYPRESS_NOTIFICATION: Self
pub const KEYPRESS_NOTIFICATION: Self
Keypress notification event
Sourcepub const REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION: Self
pub const REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION: Self
Remote host supported features notification event
Sourcepub const LE_META_EVENT: Self
pub const LE_META_EVENT: Self
LE meta-events
Source§impl EventFlags
impl EventFlags
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 EventFlags
impl EventFlags
Sourcepub const fn iter(&self) -> Iter<EventFlags>
pub const fn iter(&self) -> Iter<EventFlags>
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<EventFlags>
pub const fn iter_names(&self) -> IterNames<EventFlags>
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 EventFlags
impl Binary for EventFlags
Source§impl BitAnd for EventFlags
impl BitAnd for EventFlags
Source§impl BitAndAssign for EventFlags
impl BitAndAssign for EventFlags
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 EventFlags
impl BitOr for EventFlags
Source§fn bitor(self, other: EventFlags) -> Self
fn bitor(self, other: EventFlags) -> Self
The bitwise or (|
) of the bits in two flags values.
Source§type Output = EventFlags
type Output = EventFlags
|
operator.Source§impl BitOrAssign for EventFlags
impl BitOrAssign for EventFlags
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 EventFlags
impl BitXor for EventFlags
Source§impl BitXorAssign for EventFlags
impl BitXorAssign for EventFlags
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 Default for EventFlags
impl Default for EventFlags
Source§fn default() -> EventFlags
fn default() -> EventFlags
Source§impl Extend<EventFlags> for EventFlags
impl Extend<EventFlags> for EventFlags
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 EventFlags
impl Flags for EventFlags
Source§const FLAGS: &'static [Flag<EventFlags>]
const FLAGS: &'static [Flag<EventFlags>]
Source§fn from_bits_retain(bits: u64) -> EventFlags
fn from_bits_retain(bits: u64) -> EventFlags
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<EventFlags> for EventFlags
impl FromIterator<EventFlags> for EventFlags
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 EventFlags
impl IntoIterator for EventFlags
Source§impl LowerHex for EventFlags
impl LowerHex for EventFlags
Source§impl Not for EventFlags
impl Not for EventFlags
Source§impl Octal for EventFlags
impl Octal for EventFlags
Source§impl PublicFlags for EventFlags
impl PublicFlags for EventFlags
Source§impl Sub for EventFlags
impl Sub for EventFlags
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 = EventFlags
type Output = EventFlags
-
operator.Source§impl SubAssign for EventFlags
impl SubAssign for EventFlags
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.