[][src]Enum ieee802154::mac::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

Implementations

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 Clone for FrameType[src]

impl Copy for FrameType[src]

impl Debug for FrameType[src]

impl Eq for FrameType[src]

impl Hash for FrameType[src]

impl PartialEq<FrameType> for FrameType[src]

impl StructuralEq for FrameType[src]

impl StructuralPartialEq for FrameType[src]

Auto Trait Implementations

impl Send for FrameType

impl Sync for FrameType

impl Unpin for FrameType

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.