pub struct HubDescriptor {
pub ports: u8,
pub characteristics: u16,
pub power_on_delay_ms: u32,
}Expand description
The hub class descriptor (USB 2.0 §11.23.2.1).
Fields§
§ports: u8bNbrPorts.
characteristics: u16wHubCharacteristics.
power_on_delay_ms: u32bPwrOn2PwrGood converted to milliseconds.
Implementations§
Source§impl HubDescriptor
impl HubDescriptor
Sourcepub const LEN: usize = 9
pub const LEN: usize = 9
Length of the descriptor header; the bitmaps that follow depend on the port count.
Sourcepub fn parse(bytes: &[u8]) -> HostResult<Self>
pub fn parse(bytes: &[u8]) -> HostResult<Self>
Parse the bytes returned by the class-specific GET_DESCRIPTOR.
Sourcepub fn power_switching(&self) -> u16
pub fn power_switching(&self) -> u16
Logical power switching mode.
Sourcepub fn tt_think_time(&self) -> u8
pub fn tt_think_time(&self) -> u8
Transaction translator think time, in high-speed hubs.
Trait Implementations§
Source§impl Clone for HubDescriptor
impl Clone for HubDescriptor
impl Copy for HubDescriptor
Source§impl Debug for HubDescriptor
impl Debug for HubDescriptor
impl Eq for HubDescriptor
Source§impl Format for HubDescriptor
impl Format for HubDescriptor
Source§impl PartialEq for HubDescriptor
impl PartialEq for HubDescriptor
impl StructuralPartialEq for HubDescriptor
Auto Trait Implementations§
impl Forget for HubDescriptor
impl Freeze for HubDescriptor
impl Move for HubDescriptor
impl RefUnwindSafe for HubDescriptor
impl Send for HubDescriptor
impl Sync for HubDescriptor
impl Unpin for HubDescriptor
impl UnsafeUnpin for HubDescriptor
impl UnwindSafe for HubDescriptor
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