Enum xsens_mti::message::PayloadLength
source · pub enum PayloadLength {
Standard(u8),
Extended(u16),
}
Variants§
Implementations§
source§impl PayloadLength
impl PayloadLength
pub const MAX_STD: u8 = 254u8
pub const MAX_EXT: u16 = 2_048u16
pub const fn new_standard(len: u8) -> Option<Self>
pub const fn new_extended(len: u16) -> Option<Self>
pub const fn new(len: usize) -> Option<Self>
pub fn get(&self) -> usize
pub fn is_extended(&self) -> bool
Trait Implementations§
source§impl Clone for PayloadLength
impl Clone for PayloadLength
source§fn clone(&self) -> PayloadLength
fn clone(&self) -> PayloadLength
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 PayloadLength
impl Debug for PayloadLength
source§impl Hash for PayloadLength
impl Hash for PayloadLength
source§impl Ord for PayloadLength
impl Ord for PayloadLength
source§fn cmp(&self, other: &PayloadLength) -> Ordering
fn cmp(&self, other: &PayloadLength) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for PayloadLength
impl PartialEq for PayloadLength
source§fn eq(&self, other: &PayloadLength) -> bool
fn eq(&self, other: &PayloadLength) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PayloadLength
impl PartialOrd for PayloadLength
source§fn partial_cmp(&self, other: &PayloadLength) -> Option<Ordering>
fn partial_cmp(&self, other: &PayloadLength) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for PayloadLength
impl Eq for PayloadLength
impl StructuralEq for PayloadLength
impl StructuralPartialEq for PayloadLength
Auto Trait Implementations§
impl RefUnwindSafe for PayloadLength
impl Send for PayloadLength
impl Sync for PayloadLength
impl Unpin for PayloadLength
impl UnwindSafe for PayloadLength
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