pub struct XhciDeviceDescriptor {
pub usb_version: u16,
pub device_class: u8,
pub device_subclass: u8,
pub device_protocol: u8,
pub max_packet_size_ep0: u8,
pub vendor_id: u16,
pub product_id: u16,
pub device_version: u16,
pub manufacturer_index: u8,
pub product_index: u8,
pub serial_index: u8,
pub num_configurations: u8,
}Expand description
Parsed USB Device Descriptor (18 bytes)
Fields§
§usb_version: u16§device_class: u8§device_subclass: u8§device_protocol: u8§max_packet_size_ep0: u8§vendor_id: u16§product_id: u16§device_version: u16§manufacturer_index: u8§product_index: u8§serial_index: u8§num_configurations: u8Implementations§
Source§impl XhciDeviceDescriptor
impl XhciDeviceDescriptor
Sourcepub fn parse(data: &[u8]) -> Result<Self, KernelError>
pub fn parse(data: &[u8]) -> Result<Self, KernelError>
Parse from a raw 18-byte descriptor buffer
Trait Implementations§
Source§impl Clone for XhciDeviceDescriptor
impl Clone for XhciDeviceDescriptor
Source§fn clone(&self) -> XhciDeviceDescriptor
fn clone(&self) -> XhciDeviceDescriptor
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for XhciDeviceDescriptor
impl Debug for XhciDeviceDescriptor
impl Copy for XhciDeviceDescriptor
Auto Trait Implementations§
impl Freeze for XhciDeviceDescriptor
impl RefUnwindSafe for XhciDeviceDescriptor
impl Send for XhciDeviceDescriptor
impl Sync for XhciDeviceDescriptor
impl Unpin for XhciDeviceDescriptor
impl UnwindSafe for XhciDeviceDescriptor
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)