pub struct Class {
pub class: u8,
pub sub_class: u8,
pub protocol: u8,
}Expand description
USB interface class.
Fields§
§class: u8Class code.
sub_class: u8Subclass code.
protocol: u8Protocol code.
Implementations§
Source§impl Class
impl Class
Sourcepub const VENDOR_SPECIFIC: u8 = 255u8
pub const VENDOR_SPECIFIC: u8 = 255u8
Vendor specific class code.
Sourcepub const fn new(class: u8, sub_class: u8, protocol: u8) -> Self
pub const fn new(class: u8, sub_class: u8, protocol: u8) -> Self
Creates a new USB device or interface class.
Sourcepub const fn vendor_specific(sub_class: u8, protocol: u8) -> Self
pub const fn vendor_specific(sub_class: u8, protocol: u8) -> Self
Creates a new USB device or interface class with vendor-specific class code.
Examples found in repository?
More examples
Trait Implementations§
Source§impl From<Class> for InterfaceId
Available on crate feature device only.
impl From<Class> for InterfaceId
Available on crate feature
device only.Source§impl Ord for Class
impl Ord for Class
Source§impl PartialOrd for Class
impl PartialOrd 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