Struct stm32wb_hci::ChannelClassification
source · pub struct ChannelClassification(/* private fields */);
Expand description
Channel classifications for the LE Set Host Channel Classification command.
If a flag is set, its classification is “Unknown”. If the flag is cleared, it is known “bad”.
Implementations§
source§impl ChannelClassification
impl ChannelClassification
sourcepub fn from_bits(bits: &[u8]) -> Option<ChannelClassification>
pub fn from_bits(bits: &[u8]) -> Option<ChannelClassification>
Attempts to create a bit field from the given byte array. If any unknown bit is set, returns None.
sourcepub fn copy_into_slice(&self, bytes: &mut [u8])
pub fn copy_into_slice(&self, bytes: &mut [u8])
Copies the bitfield array into the given slice. The slice must have exactly the right number of elements.
sourcepub fn all() -> ChannelClassification
pub fn all() -> ChannelClassification
Returns a bit field with all flags set.
sourcepub fn empty() -> ChannelClassification
pub fn empty() -> ChannelClassification
Returns a bit field with no flags set.
sourcepub fn is_set(&self, flag: ChannelFlag) -> bool
pub fn is_set(&self, flag: ChannelFlag) -> bool
Returns true if the flag is set in the bitfield.
sourcepub fn contains(&self, flags: ChannelClassification) -> bool
pub fn contains(&self, flags: ChannelClassification) -> bool
Returns true if all flags from flags
are set in the bitfield.
Trait Implementations§
source§impl Clone for ChannelClassification
impl Clone for ChannelClassification
source§fn clone(&self) -> ChannelClassification
fn clone(&self) -> ChannelClassification
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 moresource§impl Debug for ChannelClassification
impl Debug for ChannelClassification
source§impl PartialEq for ChannelClassification
impl PartialEq for ChannelClassification
source§fn eq(&self, rhs: &ChannelClassification) -> bool
fn eq(&self, rhs: &ChannelClassification) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ChannelClassification
Auto Trait Implementations§
impl RefUnwindSafe for ChannelClassification
impl Send for ChannelClassification
impl Sync for ChannelClassification
impl Unpin for ChannelClassification
impl UnwindSafe for ChannelClassification
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