pub struct ChannelClassification(_);
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

source

pub const CH_0: ChannelFlag = _

Channel 0 classification not known.

source

pub const CH_1: ChannelFlag = _

Channel 1 classification not known.

source

pub const CH_2: ChannelFlag = _

Channel 2 classification not known.

source

pub const CH_3: ChannelFlag = _

Channel 3 classification not known.

source

pub const CH_4: ChannelFlag = _

Channel 4 classification not known.

source

pub const CH_5: ChannelFlag = _

Channel 5 classification not known.

source

pub const CH_6: ChannelFlag = _

Channel 6 classification not known.

source

pub const CH_7: ChannelFlag = _

Channel 7 classification not known.

source

pub const CH_8: ChannelFlag = _

Channel 8 classification not known.

source

pub const CH_9: ChannelFlag = _

Channel 9 classification not known.

source

pub const CH_10: ChannelFlag = _

Channel 10 classification not known.

source

pub const CH_11: ChannelFlag = _

Channel 11 classification not known.

source

pub const CH_12: ChannelFlag = _

Channel 12 classification not known.

source

pub const CH_13: ChannelFlag = _

Channel 13 classification not known.

source

pub const CH_14: ChannelFlag = _

Channel 14 classification not known.

source

pub const CH_15: ChannelFlag = _

Channel 15 classification not known.

source

pub const CH_16: ChannelFlag = _

Channel 16 classification not known.

source

pub const CH_17: ChannelFlag = _

Channel 17 classification not known.

source

pub const CH_18: ChannelFlag = _

Channel 18 classification not known.

source

pub const CH_19: ChannelFlag = _

Channel 19 classification not known.

source

pub const CH_20: ChannelFlag = _

Channel 20 classification not known.

source

pub const CH_21: ChannelFlag = _

Channel 21 classification not known.

source

pub const CH_22: ChannelFlag = _

Channel 22 classification not known.

source

pub const CH_23: ChannelFlag = _

Channel 23 classification not known.

source

pub const CH_24: ChannelFlag = _

Channel 24 classification not known.

source

pub const CH_25: ChannelFlag = _

Channel 25 classification not known.

source

pub const CH_26: ChannelFlag = _

Channel 26 classification not known.

source

pub const CH_27: ChannelFlag = _

Channel 27 classification not known.

source

pub const CH_28: ChannelFlag = _

Channel 28 classification not known.

source

pub const CH_29: ChannelFlag = _

Channel 29 classification not known.

source

pub const CH_30: ChannelFlag = _

Channel 30 classification not known.

source

pub const CH_31: ChannelFlag = _

Channel 31 classification not known.

source

pub const CH_32: ChannelFlag = _

Channel 32 classification not known.

source

pub const CH_33: ChannelFlag = _

Channel 33 classification not known.

source

pub const CH_34: ChannelFlag = _

Channel 34 classification not known.

source

pub const CH_35: ChannelFlag = _

Channel 35 classification not known.

source

pub const CH_36: ChannelFlag = _

Channel 36 classification not known.

source

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.

source

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.

source

pub fn all() -> ChannelClassification

Returns a bit field with all flags set.

source

pub fn empty() -> ChannelClassification

Returns a bit field with no flags set.

source

pub fn bits(&self) -> &[u8]

Returns a slice to the underlying representation of the bit field.

source

pub fn is_empty(&self) -> bool

Returns true if no fields are set.

source

pub fn is_set(&self, flag: ChannelFlag) -> bool

Returns true if the flag is set in the bitfield.

source

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

source§

fn clone(&self) -> ChannelClassification

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ChannelClassification

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<ChannelClassification> for ChannelClassification

source§

fn eq(&self, rhs: &ChannelClassification) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for ChannelClassification

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.