Struct bluetooth_hci::host::Channels [−]
pub struct Channels { /* fields omitted */ }
The advertising channels that shall be used when transmitting advertising packets.
Methods
impl Channels
impl Channels
pub const CH_37: Channels
CH_37: Channels = Channels{bits: 1,}
Channel 37 shall be used
pub const CH_38: Channels
CH_38: Channels = Channels{bits: 2,}
Channel 38 shall be used
pub const CH_39: Channels
CH_39: Channels = Channels{bits: 4,}
Channel 39 shall be used
pub fn empty() -> Channels
pub fn empty() -> Channels
Returns an empty set of flags.
pub fn all() -> Channels
pub fn all() -> Channels
Returns the set containing all flags.
pub fn bits(&self) -> u8
pub fn bits(&self) -> u8
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u8) -> Option<Channels>
pub fn from_bits(bits: u8) -> Option<Channels>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u8) -> Channels
pub fn from_bits_truncate(bits: u8) -> Channels
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: Channels) -> bool
pub fn intersects(&self, other: Channels) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: Channels) -> bool
pub fn contains(&self, other: Channels) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: Channels)
pub fn insert(&mut self, other: Channels)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Channels)
pub fn remove(&mut self, other: Channels)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Channels)
pub fn toggle(&mut self, other: Channels)
Toggles the specified flags in-place.
pub fn set(&mut self, other: Channels, value: bool)
pub fn set(&mut self, other: Channels, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for Channels
impl Copy for Channels
impl PartialEq for Channels
impl PartialEq for Channels
fn eq(&self, other: &Channels) -> bool
fn eq(&self, other: &Channels) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Channels) -> bool
fn ne(&self, other: &Channels) -> bool
This method tests for !=
.
impl Eq for Channels
impl Eq for Channels
impl Clone for Channels
impl Clone for Channels
fn clone(&self) -> Channels
fn clone(&self) -> Channels
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 Channels
impl PartialOrd for Channels
fn partial_cmp(&self, other: &Channels) -> Option<Ordering>
fn partial_cmp(&self, other: &Channels) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Channels) -> bool
fn lt(&self, other: &Channels) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Channels) -> bool
fn le(&self, other: &Channels) -> 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: &Channels) -> bool
fn gt(&self, other: &Channels) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Channels) -> bool
fn ge(&self, other: &Channels) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Channels
impl Ord for Channels
fn cmp(&self, other: &Channels) -> Ordering
fn cmp(&self, other: &Channels) -> 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 Channels
impl Hash for Channels
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 Debug for Channels
impl Debug for Channels
impl Binary for Channels
impl Binary for Channels
impl Octal for Channels
impl Octal for Channels
impl LowerHex for Channels
impl LowerHex for Channels
impl UpperHex for Channels
impl UpperHex for Channels
impl BitOr for Channels
impl BitOr for Channels
type Output = Channels
The resulting type after applying the |
operator.
fn bitor(self, other: Channels) -> Channels
fn bitor(self, other: Channels) -> Channels
Returns the union of the two sets of flags.
impl BitOrAssign for Channels
impl BitOrAssign for Channels
fn bitor_assign(&mut self, other: Channels)
fn bitor_assign(&mut self, other: Channels)
Adds the set of flags.
impl BitXor for Channels
impl BitXor for Channels
type Output = Channels
The resulting type after applying the ^
operator.
fn bitxor(self, other: Channels) -> Channels
fn bitxor(self, other: Channels) -> Channels
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for Channels
impl BitXorAssign for Channels
fn bitxor_assign(&mut self, other: Channels)
fn bitxor_assign(&mut self, other: Channels)
Toggles the set of flags.
impl BitAnd for Channels
impl BitAnd for Channels
type Output = Channels
The resulting type after applying the &
operator.
fn bitand(self, other: Channels) -> Channels
fn bitand(self, other: Channels) -> Channels
Returns the intersection between the two sets of flags.
impl BitAndAssign for Channels
impl BitAndAssign for Channels
fn bitand_assign(&mut self, other: Channels)
fn bitand_assign(&mut self, other: Channels)
Disables all flags disabled in the set.
impl Sub for Channels
impl Sub for Channels
type Output = Channels
The resulting type after applying the -
operator.
fn sub(self, other: Channels) -> Channels
fn sub(self, other: Channels) -> Channels
Returns the set difference of the two sets of flags.
impl SubAssign for Channels
impl SubAssign for Channels
fn sub_assign(&mut self, other: Channels)
fn sub_assign(&mut self, other: Channels)
Disables all flags enabled in the set.
impl Not for Channels
impl Not for Channels
type Output = Channels
The resulting type after applying the !
operator.
fn not(self) -> Channels
fn not(self) -> Channels
Returns the complement of this set of flags.
impl Extend<Channels> for Channels
impl Extend<Channels> for Channels
fn extend<T: IntoIterator<Item = Channels>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Channels>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<Channels> for Channels
impl FromIterator<Channels> for Channels
fn from_iter<T: IntoIterator<Item = Channels>>(iterator: T) -> Channels
fn from_iter<T: IntoIterator<Item = Channels>>(iterator: T) -> Channels
Creates a value from an iterator. Read more
impl Default for Channels
[src]
impl Default for Channels