Enum ieee802154::mac::frame::header::FrameVersion
source · [−]pub enum FrameVersion {
Ieee802154_2003,
Ieee802154_2006,
Ieee802154,
}
Expand description
Defines version information for a frame
Variants
Ieee802154_2003
A frame conforming to the 802.15.4-2003 standard
Ieee802154_2006
A frame conforming to the 802.15.4-2006 standard
Ieee802154
A frame conforming to the current 802.15.4 standard
Implementations
sourceimpl FrameVersion
impl FrameVersion
sourcepub fn from_bits(bits: u8) -> Option<Self>
pub fn from_bits(bits: u8) -> Option<Self>
Creates an instance of FrameVersion
from the provided bits
Returns None
, if the provided bits don’t encode a valid value of
FrameVersion
.
Example
use ieee802154::mac::FrameVersion;
let version = FrameVersion::from_bits(0b0);
assert_eq!(version, Some(FrameVersion::Ieee802154_2003));
Trait Implementations
sourceimpl Clone for FrameVersion
impl Clone for FrameVersion
sourcefn clone(&self) -> FrameVersion
fn clone(&self) -> FrameVersion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FrameVersion
impl Debug for FrameVersion
sourceimpl Hash for FrameVersion
impl Hash for FrameVersion
sourceimpl PartialEq<FrameVersion> for FrameVersion
impl PartialEq<FrameVersion> for FrameVersion
sourcefn eq(&self, other: &FrameVersion) -> bool
fn eq(&self, other: &FrameVersion) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Copy for FrameVersion
impl Eq for FrameVersion
impl StructuralEq for FrameVersion
impl StructuralPartialEq for FrameVersion
Auto Trait Implementations
impl RefUnwindSafe for FrameVersion
impl Send for FrameVersion
impl Sync for FrameVersion
impl Unpin for FrameVersion
impl UnwindSafe for FrameVersion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more