[][src]Enum ieee802154::mac::frame::FrameType

pub enum FrameType {
    Beacon,
    Data,
    Acknowledgement,
    MacCommand,
}

Defines the type of a MAC frame

Part of Header.

Variants

Beacon

Beacon

Data

Data

Acknowledgement

Acknowledgement

MacCommand

MAC command

Methods

impl FrameType[src]

pub fn from_bits(bits: u8) -> Option<Self>[src]

Creates an instance of FrameType from the provided bits

Returns None, if the provided bits don't encode a valid frame type.

Example

use ieee802154::mac::FrameType;

let frame_type = FrameType::from_bits(0b001);
assert_eq!(frame_type, Some(FrameType::Data));

Trait Implementations

impl PartialEq<FrameType> for FrameType[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Eq for FrameType[src]

impl Clone for FrameType[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for FrameType[src]

impl Debug for FrameType[src]

impl Hash for FrameType[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for FrameType

impl Sync for FrameType

Blanket Implementations

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> From for T[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]