pub struct UsageMaximum { /* private fields */ }Expand description
Defines the ending 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 UsageMaximum
impl UsageMaximum
Sourcepub const PREFIX: u8 = 40u8
pub const PREFIX: u8 = 40u8
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 UsageMaximum 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 UsageMaximum
impl AsRef<[u8]> for UsageMaximum
Source§impl Clone for UsageMaximum
impl Clone for UsageMaximum
Source§fn clone(&self) -> UsageMaximum
fn clone(&self) -> UsageMaximum
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 UsageMaximum
impl Debug for UsageMaximum
Source§impl Default for UsageMaximum
impl Default for UsageMaximum
Source§impl Display for UsageMaximum
impl Display for UsageMaximum
Source§impl PartialEq for UsageMaximum
impl PartialEq for UsageMaximum
impl Eq for UsageMaximum
Auto Trait Implementations§
impl Freeze for UsageMaximum
impl RefUnwindSafe for UsageMaximum
impl Send for UsageMaximum
impl Sync for UsageMaximum
impl Unpin for UsageMaximum
impl UnwindSafe for UsageMaximum
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