pub struct UsageMinimum { /* private fields */ }Expand description
Defines the starting usage associated with an array or bitmap.
§Data (Little Endian)
Depends on the value of UsagePage. See HID Usage Tables FOR Universal Serial Bus.
Implementations§
Source§impl UsageMinimum
impl UsageMinimum
Sourcepub const PREFIX: u8 = 24u8
pub const PREFIX: u8 = 24u8
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 set_usage_page(&mut self, usage_page: UsagePage)
pub fn set_usage_page(&mut self, usage_page: UsagePage)
If you want more detailed content printed when formatting, you need to set the related usage page.
§Equality
Equality between two UsageMinimum items ignores usage page.
Sourcepub fn usage_page(&self) -> Option<&UsagePage>
pub fn usage_page(&self) -> Option<&UsagePage>
Get usage page.
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 UsageMinimum
impl AsRef<[u8]> for UsageMinimum
Source§impl Clone for UsageMinimum
impl Clone for UsageMinimum
Source§fn clone(&self) -> UsageMinimum
fn clone(&self) -> UsageMinimum
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 UsageMinimum
impl Debug for UsageMinimum
Source§impl Default for UsageMinimum
impl Default for UsageMinimum
Source§impl Display for UsageMinimum
impl Display for UsageMinimum
Source§impl PartialEq for UsageMinimum
impl PartialEq for UsageMinimum
impl Eq for UsageMinimum
Auto Trait Implementations§
impl Freeze for UsageMinimum
impl RefUnwindSafe for UsageMinimum
impl Send for UsageMinimum
impl Sync for UsageMinimum
impl Unpin for UsageMinimum
impl UnwindSafe for UsageMinimum
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