pub struct UnitExponent(/* private fields */);Expand description
Value of the unit exponent in base 10.
§Data (Little Endian)
- 0x0: 0
- 0x1: 1
- 0x2: 2
- 0x3: 3
- 0x4: 4
- 0x5: 5
- 0x6: 6
- 0x7: 7
- 0x8: -8
- 0x9: -7
- 0xA: -6
- 0xB: -5
- 0xC: -4
- 0xD: -3
- 0xE: -2
- 0xF: -1
Implementations§
Source§impl UnitExponent
impl UnitExponent
Sourcepub const PREFIX: u8 = 84u8
pub const PREFIX: u8 = 84u8
Prefix consists of tag(bit 7-4), type(bit 3-2) and size(bit 1-0).
The “size” part is set to 00 in this constant value.
Sourcepub unsafe fn new_unchecked(raw: &[u8]) -> Self
pub unsafe fn new_unchecked(raw: &[u8]) -> Self
Sourcepub fn new_with(data: &[u8]) -> Result<Self, HidError>
pub fn new_with(data: &[u8]) -> Result<Self, HidError>
Create an item with specific data.
NOTE: data size must be: 0, 1, 2 or 4.
Trait Implementations§
Source§impl AsRef<[u8]> for UnitExponent
impl AsRef<[u8]> for UnitExponent
Source§impl Clone for UnitExponent
impl Clone for UnitExponent
Source§fn clone(&self) -> UnitExponent
fn clone(&self) -> UnitExponent
Returns a duplicate 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 UnitExponent
impl Debug for UnitExponent
Source§impl Default for UnitExponent
impl Default for UnitExponent
Source§impl Display for UnitExponent
impl Display for UnitExponent
Source§impl PartialEq for UnitExponent
impl PartialEq for UnitExponent
impl Eq for UnitExponent
impl StructuralPartialEq for UnitExponent
Auto Trait Implementations§
impl Freeze for UnitExponent
impl RefUnwindSafe for UnitExponent
impl Send for UnitExponent
impl Sync for UnitExponent
impl Unpin for UnitExponent
impl UnwindSafe for UnitExponent
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