#[non_exhaustive]#[repr(u16)]pub enum KnownUsage {
Undefined = 0,
SocControl = 1,
FirmwareTransfer = 2,
FirmwareFileId = 3,
FileOffsetInBytes = 4,
FileTransferSizeMaxInBytes = 5,
FilePayload = 6,
FilePayloadSizeInBytes = 7,
FilePayloadContainsLastBytes = 8,
FileTransferStop = 9,
FileTransferTillEnd = 10,
}Expand description
Usage ID values from the SOC Usage Page.
See HID Usage Tables for Universal Serial Bus, section 20.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Undefined = 0
SocControl = 1
FirmwareTransfer = 2
FirmwareFileId = 3
FileOffsetInBytes = 4
FileTransferSizeMaxInBytes = 5
FilePayload = 6
FilePayloadSizeInBytes = 7
FilePayloadContainsLastBytes = 8
FileTransferStop = 9
FileTransferTillEnd = 10
Trait Implementations§
Source§impl Clone for KnownUsage
impl Clone for KnownUsage
impl Copy for KnownUsage
Source§impl Debug for KnownUsage
impl Debug for KnownUsage
impl Eq for KnownUsage
Source§impl From<KnownUsage> for u16
impl From<KnownUsage> for u16
Source§fn from(enum_value: KnownUsage) -> Self
fn from(enum_value: KnownUsage) -> Self
Converts to this type from the input type.
Source§impl PartialEq for KnownUsage
impl PartialEq for KnownUsage
impl StructuralPartialEq for KnownUsage
Source§impl TryFrom<u16> for KnownUsage
impl TryFrom<u16> for KnownUsage
Source§type Error = TryFromPrimitiveError<KnownUsage>
type Error = TryFromPrimitiveError<KnownUsage>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for KnownUsage
impl TryFromPrimitive for KnownUsage
const NAME: &'static str = "KnownUsage"
type Primitive = u16
type Error = TryFromPrimitiveError<KnownUsage>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Freeze for KnownUsage
impl RefUnwindSafe for KnownUsage
impl Send for KnownUsage
impl Sync for KnownUsage
impl Unpin for KnownUsage
impl UnsafeUnpin for KnownUsage
impl UnwindSafe for KnownUsage
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