#[non_exhaustive]pub enum UsbSpeed {
Low,
Full,
High,
Super,
SuperPlus,
}Expand description
The bus speed a device runs at: the SBRM’s current speed register, as the Grasshopper3’s XML decodes it, or the speed the host reports.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Low
USB 1 low speed, 1.5 Mbit/s.
Full
USB 1 full speed, 12 Mbit/s.
High
USB 2 high speed, 480 Mbit/s.
Super
USB 3 SuperSpeed, 5 Gbit/s.
SuperPlus
USB 3 SuperSpeed+, 10 Gbit/s or more.
Implementations§
Source§impl UsbSpeed
impl UsbSpeed
Sourcepub fn from_register(bits: u32) -> Option<Self>
pub fn from_register(bits: u32) -> Option<Self>
The speed the SBRM’s current speed register reports: one bit set,
bit 3 SuperSpeed, bit 2 high, bit 1 full, bit 0 low — the bits the
Grasshopper3’s XML tests (CurrentSpeed_Int). Bit 4 is read as
SuperSpeed+, by analogy; no document in the corpus shows it. None
for 0, a device that does not say.
Sourcepub fn is_below_superspeed(self) -> bool
pub fn is_below_superspeed(self) -> bool
Whether this is a USB 2 speed or slower: a USB3 Vision camera on such a link runs at a fraction of its bandwidth, if at all — a USB 2 port or cable, or a hub between.
Trait Implementations§
impl Copy for UsbSpeed
impl Eq for UsbSpeed
Source§impl Ord for UsbSpeed
impl Ord for UsbSpeed
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for UsbSpeed
impl PartialOrd for UsbSpeed
impl StructuralPartialEq for UsbSpeed
Auto Trait Implementations§
impl Freeze for UsbSpeed
impl RefUnwindSafe for UsbSpeed
impl Send for UsbSpeed
impl Sync for UsbSpeed
impl Unpin for UsbSpeed
impl UnsafeUnpin for UsbSpeed
impl UnwindSafe for UsbSpeed
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.