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
impl Copy for ChannelClassification
Auto Trait Implementations§
impl Freeze for ChannelClassification
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