pub struct XhciConfigDescriptor {
pub total_length: u16,
pub num_interfaces: u8,
pub config_value: u8,
pub config_index: u8,
pub attributes: u8,
pub max_power_ma: u16,
}Expand description
Parsed USB Configuration Descriptor header (9 bytes)
Fields§
§total_length: u16§num_interfaces: u8§config_value: u8§config_index: u8§attributes: u8§max_power_ma: u16Implementations§
Source§impl XhciConfigDescriptor
impl XhciConfigDescriptor
Sourcepub fn parse(data: &[u8]) -> Result<Self, KernelError>
pub fn parse(data: &[u8]) -> Result<Self, KernelError>
Parse from a raw descriptor buffer (at least 9 bytes)
Sourcepub fn is_self_powered(&self) -> bool
pub fn is_self_powered(&self) -> bool
Whether the device is self-powered
Sourcepub fn supports_remote_wakeup(&self) -> bool
pub fn supports_remote_wakeup(&self) -> bool
Whether remote wakeup is supported
Trait Implementations§
Source§impl Clone for XhciConfigDescriptor
impl Clone for XhciConfigDescriptor
Source§fn clone(&self) -> XhciConfigDescriptor
fn clone(&self) -> XhciConfigDescriptor
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 XhciConfigDescriptor
impl Debug for XhciConfigDescriptor
impl Copy for XhciConfigDescriptor
Auto Trait Implementations§
impl Freeze for XhciConfigDescriptor
impl RefUnwindSafe for XhciConfigDescriptor
impl Send for XhciConfigDescriptor
impl Sync for XhciConfigDescriptor
impl Unpin for XhciConfigDescriptor
impl UnwindSafe for XhciConfigDescriptor
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)