Struct bluetooth_hci::LinkLayerFeature [−]
pub struct LinkLayerFeature { /* fields omitted */ }
Bitfield for LE Remote Features.
Fields are defined in Vol 6, Part B, Section 4.6 of the spec. See Table 4.3 (version 4.1) or Table 4.4 (version 4.2 and 5.0).
Methods
impl LinkLayerFeature
impl LinkLayerFeature
pub const LE_ENCRYPTION: LinkLayerFeature
LE_ENCRYPTION: LinkLayerFeature = LinkLayerFeature{bits: 1 << 0,}
See section 4.6.1
pub const CONNECTION_PARAMETERS_REQUEST_PROCEDURE: LinkLayerFeature
CONNECTION_PARAMETERS_REQUEST_PROCEDURE: LinkLayerFeature = LinkLayerFeature{bits: 1 << 1,}
See section 4.6.2
pub const EXTENDED_REJECT_INDICATION: LinkLayerFeature
EXTENDED_REJECT_INDICATION: LinkLayerFeature = LinkLayerFeature{bits: 1 << 2,}
See section 4.6.3
pub const PERIPHERAL_INITIATED_FEATURES_EXCHANGE: LinkLayerFeature
PERIPHERAL_INITIATED_FEATURES_EXCHANGE: LinkLayerFeature = LinkLayerFeature{bits: 1 << 3,}
See section 4.6.4
pub const LE_PING: LinkLayerFeature
LE_PING: LinkLayerFeature = LinkLayerFeature{bits: 1 << 4,}
See section 4.6.5
pub fn empty() -> LinkLayerFeature
pub fn empty() -> LinkLayerFeature
Returns an empty set of flags.
pub fn all() -> LinkLayerFeature
pub fn all() -> LinkLayerFeature
Returns the set containing all flags.
pub fn bits(&self) -> u64
pub fn bits(&self) -> u64
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u64) -> Option<LinkLayerFeature>
pub fn from_bits(bits: u64) -> Option<LinkLayerFeature>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u64) -> LinkLayerFeature
pub fn from_bits_truncate(bits: u64) -> LinkLayerFeature
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: LinkLayerFeature) -> bool
pub fn intersects(&self, other: LinkLayerFeature) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: LinkLayerFeature) -> bool
pub fn contains(&self, other: LinkLayerFeature) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: LinkLayerFeature)
pub fn insert(&mut self, other: LinkLayerFeature)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: LinkLayerFeature)
pub fn remove(&mut self, other: LinkLayerFeature)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: LinkLayerFeature)
pub fn toggle(&mut self, other: LinkLayerFeature)
Toggles the specified flags in-place.
pub fn set(&mut self, other: LinkLayerFeature, value: bool)
pub fn set(&mut self, other: LinkLayerFeature, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for LinkLayerFeature
impl Copy for LinkLayerFeature
impl PartialEq for LinkLayerFeature
impl PartialEq for LinkLayerFeature
fn eq(&self, other: &LinkLayerFeature) -> bool
fn eq(&self, other: &LinkLayerFeature) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &LinkLayerFeature) -> bool
fn ne(&self, other: &LinkLayerFeature) -> bool
This method tests for !=
.
impl Eq for LinkLayerFeature
impl Eq for LinkLayerFeature
impl Clone for LinkLayerFeature
impl Clone for LinkLayerFeature
fn clone(&self) -> LinkLayerFeature
fn clone(&self) -> LinkLayerFeature
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialOrd for LinkLayerFeature
impl PartialOrd for LinkLayerFeature
fn partial_cmp(&self, other: &LinkLayerFeature) -> Option<Ordering>
fn partial_cmp(&self, other: &LinkLayerFeature) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &LinkLayerFeature) -> bool
fn lt(&self, other: &LinkLayerFeature) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &LinkLayerFeature) -> bool
fn le(&self, other: &LinkLayerFeature) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &LinkLayerFeature) -> bool
fn gt(&self, other: &LinkLayerFeature) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &LinkLayerFeature) -> bool
fn ge(&self, other: &LinkLayerFeature) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for LinkLayerFeature
impl Ord for LinkLayerFeature
fn cmp(&self, other: &LinkLayerFeature) -> Ordering
fn cmp(&self, other: &LinkLayerFeature) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for LinkLayerFeature
impl Hash for LinkLayerFeature
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for LinkLayerFeature
[src]
impl Default for LinkLayerFeature
fn default() -> LinkLayerFeature
[src]
fn default() -> LinkLayerFeature
Returns the "default value" for a type. Read more
impl Debug for LinkLayerFeature
impl Debug for LinkLayerFeature
impl Binary for LinkLayerFeature
impl Binary for LinkLayerFeature
impl Octal for LinkLayerFeature
impl Octal for LinkLayerFeature
impl LowerHex for LinkLayerFeature
impl LowerHex for LinkLayerFeature
impl UpperHex for LinkLayerFeature
impl UpperHex for LinkLayerFeature
impl BitOr for LinkLayerFeature
impl BitOr for LinkLayerFeature
type Output = LinkLayerFeature
The resulting type after applying the |
operator.
fn bitor(self, other: LinkLayerFeature) -> LinkLayerFeature
fn bitor(self, other: LinkLayerFeature) -> LinkLayerFeature
Returns the union of the two sets of flags.
impl BitOrAssign for LinkLayerFeature
impl BitOrAssign for LinkLayerFeature
fn bitor_assign(&mut self, other: LinkLayerFeature)
fn bitor_assign(&mut self, other: LinkLayerFeature)
Adds the set of flags.
impl BitXor for LinkLayerFeature
impl BitXor for LinkLayerFeature
type Output = LinkLayerFeature
The resulting type after applying the ^
operator.
fn bitxor(self, other: LinkLayerFeature) -> LinkLayerFeature
fn bitxor(self, other: LinkLayerFeature) -> LinkLayerFeature
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for LinkLayerFeature
impl BitXorAssign for LinkLayerFeature
fn bitxor_assign(&mut self, other: LinkLayerFeature)
fn bitxor_assign(&mut self, other: LinkLayerFeature)
Toggles the set of flags.
impl BitAnd for LinkLayerFeature
impl BitAnd for LinkLayerFeature
type Output = LinkLayerFeature
The resulting type after applying the &
operator.
fn bitand(self, other: LinkLayerFeature) -> LinkLayerFeature
fn bitand(self, other: LinkLayerFeature) -> LinkLayerFeature
Returns the intersection between the two sets of flags.
impl BitAndAssign for LinkLayerFeature
impl BitAndAssign for LinkLayerFeature
fn bitand_assign(&mut self, other: LinkLayerFeature)
fn bitand_assign(&mut self, other: LinkLayerFeature)
Disables all flags disabled in the set.
impl Sub for LinkLayerFeature
impl Sub for LinkLayerFeature
type Output = LinkLayerFeature
The resulting type after applying the -
operator.
fn sub(self, other: LinkLayerFeature) -> LinkLayerFeature
fn sub(self, other: LinkLayerFeature) -> LinkLayerFeature
Returns the set difference of the two sets of flags.
impl SubAssign for LinkLayerFeature
impl SubAssign for LinkLayerFeature
fn sub_assign(&mut self, other: LinkLayerFeature)
fn sub_assign(&mut self, other: LinkLayerFeature)
Disables all flags enabled in the set.
impl Not for LinkLayerFeature
impl Not for LinkLayerFeature
type Output = LinkLayerFeature
The resulting type after applying the !
operator.
fn not(self) -> LinkLayerFeature
fn not(self) -> LinkLayerFeature
Returns the complement of this set of flags.
impl Extend<LinkLayerFeature> for LinkLayerFeature
impl Extend<LinkLayerFeature> for LinkLayerFeature
fn extend<T: IntoIterator<Item = LinkLayerFeature>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = LinkLayerFeature>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<LinkLayerFeature> for LinkLayerFeature
impl FromIterator<LinkLayerFeature> for LinkLayerFeature
fn from_iter<T: IntoIterator<Item = LinkLayerFeature>>(
iterator: T
) -> LinkLayerFeature
fn from_iter<T: IntoIterator<Item = LinkLayerFeature>>(
iterator: T
) -> LinkLayerFeature
Creates a value from an iterator. Read more
Auto Trait Implementations
impl Send for LinkLayerFeature
impl Send for LinkLayerFeature
impl Sync for LinkLayerFeature
impl Sync for LinkLayerFeature