#[repr(u8)]pub enum SizeBits {
Zero = 0,
One = 1,
Two = 2,
Four = 3,
}Expand description
The bits specifying the data size.
Variants§
Implementations§
Source§impl SizeBits
impl SizeBits
Sourcepub const fn from_bits(value: u8) -> Self
pub const fn from_bits(value: u8) -> Self
Decode the size from an encoded byte value.
The input values allowed are the same as those in the binary report descriptor (0-3).
§Panics
This function will panic if the input is out of the range 0-3.
Sourcepub fn size_bytes(self) -> usize
pub fn size_bytes(self) -> usize
Return the number of bytes this field represents.
Note: this value is only correct for the “short item format”.
Trait Implementations§
impl Copy for SizeBits
impl Eq for SizeBits
impl StructuralPartialEq for SizeBits
Auto Trait Implementations§
impl Freeze for SizeBits
impl RefUnwindSafe for SizeBits
impl Send for SizeBits
impl Sync for SizeBits
impl Unpin for SizeBits
impl UnsafeUnpin for SizeBits
impl UnwindSafe for SizeBits
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