pub struct Class { /* private fields */ }
Expand description
Represents a USB device class in the USB database.
Every device class has a class ID, a pretty name, and a
list of associated SubClass
s.
use usb_ids::{Class, Classes, FromId};
let class = Class::from_id(0x03).unwrap();
assert_eq!(class.name(), "Human Interface Device");
Implementations§
Trait Implementations§
source§impl PartialEq for Class
impl PartialEq for Class
impl Copy for Class
impl Eq for Class
impl StructuralPartialEq for Class
Auto Trait Implementations§
impl Freeze for Class
impl RefUnwindSafe for Class
impl Send for Class
impl Sync for Class
impl Unpin for Class
impl UnwindSafe for Class
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)