pub struct ExtendedUsage {
pub page: UsagePage,
pub id: u16,
}Expand description
A Usage ID, that includes its parent Usage Page.
Fields§
§page: UsagePageThe Usage Page.
id: u16The Usage ID.
Implementations§
Source§impl ExtendedUsage
impl ExtendedUsage
Sourcepub fn get_known(&self) -> Option<KnownUsage>
pub fn get_known(&self) -> Option<KnownUsage>
Extract the usage value if it is a known value.
If this returns None it could be for multiple reasons:
- The Usage Page does not contain distinct IDs (e.g. Button)
- The Usage Page is unknown or reserved.
- The Usage Page is known but the Usage value is unknown or reserved.
Trait Implementations§
Source§impl Clone for ExtendedUsage
impl Clone for ExtendedUsage
Source§fn clone(&self) -> ExtendedUsage
fn clone(&self) -> ExtendedUsage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExtendedUsage
Source§impl Debug for ExtendedUsage
impl Debug for ExtendedUsage
Source§impl PartialEq for ExtendedUsage
impl PartialEq for ExtendedUsage
impl StructuralPartialEq for ExtendedUsage
Auto Trait Implementations§
impl Freeze for ExtendedUsage
impl RefUnwindSafe for ExtendedUsage
impl Send for ExtendedUsage
impl Sync for ExtendedUsage
impl Unpin for ExtendedUsage
impl UnsafeUnpin for ExtendedUsage
impl UnwindSafe for ExtendedUsage
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