Skip to main content

ClassCode

Enum ClassCode 

Source
#[non_exhaustive]
pub enum ClassCode {
Show 49 variants Generic(BaseClass), FullSpeedHub, HighSpeedHubSingleTt, HighSpeedHubMultiTt, AudioVideoControlInterface, AudioVideoDataVideo, AudioVideoDataAudio, MctpManagementController, MctpHostInterfaceEndpoint, Usb2ComplianceDevice, DebugTargetVendorDefined, GnuRemoteDebugCommandSet, VendorDefinedTraceDbC, VendorDefinedDfxDbC, VendorDefinedTraceGPDvC, GnuProtocolGpDvC, VendorDefinedDfxDvC, VendorDefinedTraceDvC, BluetoothProgrammingInterface, UwbRadioControlInterface, RemoteNdis, BluetoothAmpController, HostWireAdaptor, DeviceWireAdaptor, DeviceWireAdaptorIsochronous, ActiveSync, PalmSync, InterfaceAssociationDescriptor, WireAdaptorMultifunctionPeripheral, CableBasedAssociationFramework, RndisOverEthernet, RndisOverWifi, RndisOverWiMax, RndisOverWwan, RndisForRawIpv4, RndisForRawIpv6, RndisForGprs, Usb3VisionControlInterface, Usb3VisionEventInterface, Usb3VisionStreamingInterface, StepStreamTransport, StepRawStreamTransport, CommandInterfaceIad, CommandInterfaceId, MediaInterfaceId, DeviceFirmwareUpgrade, IrdaBridge, UsbTestMeasurement, UsbTestMeasurementUsbTmc488,
}
Expand description

Fully defined USB-IF class based on (Base Class, Sub Class, Protocol) Class Code triplet

https://www.usb.org/defined-class-codes

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.
§

Generic(BaseClass)

Generic devices just have a ‘Base Class’. It is a device without a defining SubClass or Protocol

§

FullSpeedHub

Full speed Hub

§

HighSpeedHubSingleTt

Hi-speed hub with single TT

§

HighSpeedHubMultiTt

Hi-speed hub with multiple TTs

§

AudioVideoControlInterface

Audio/Video Device – AVControl Interface

§

AudioVideoDataVideo

Audio/Video Device – AVData Video Streaming Interface

§

AudioVideoDataAudio

Audio/Video Device – AVData Audio Streaming Interface

§

MctpManagementController

MCTP Management-controller and Managed-Device endpoints

§

MctpHostInterfaceEndpoint

MCTP Host Interface endpoint

§

Usb2ComplianceDevice

USB2 Compliance Device. Definition for this device can be found at http://www.intel.com/technology/usb/spec.htm

§

DebugTargetVendorDefined

§

GnuRemoteDebugCommandSet

§

VendorDefinedTraceDbC

Vendor defined Trace protocol on DbC.

§

VendorDefinedDfxDbC

Vendor defined Dfx protocol on DbC.

§

VendorDefinedTraceGPDvC

Vendor defined Trace protocol over General Purpose (GP) endpoint on DvC.

§

GnuProtocolGpDvC

GNU Protocol protocol over General Purpose (GP) endpoint on DvC.

http://www.gnu.org/software/gdb/

§

VendorDefinedDfxDvC

Vendor defined Dfx protocol on DvC.

§

VendorDefinedTraceDvC

Vendor defined Trace protocol on DvC.

§

BluetoothProgrammingInterface

Bluetooth Programming Interface. Get specific information from www.bluetooth.com.

§

UwbRadioControlInterface

UWB Radio Control Interface. Definition for this is found in the Wireless USB Specification in Chapter 8.

§

RemoteNdis

§

BluetoothAmpController

Bluetooth AMP Controller. Get specific information from www.bluetooth.com.

§

HostWireAdaptor

Host Wire Adapter Control/Data interface. Definition can be found in the Wireless USB Specification in Chapter 8.

§

DeviceWireAdaptor

Device Wire Adapter Control/Data interface. Definition can be found in the Wireless USB Specification in Chapter 8.

§

DeviceWireAdaptorIsochronous

Device Wire Adapter Isochronous interface. Definition can be found in the Wireless USB Specification in Chapter 8.

§

ActiveSync

Active Sync device. This class code can be used in either Device or Interface Descriptors. Contact Microsoft for more information on this class.

§

PalmSync

Palm Sync. This class code can be used in either Device or Interface Descriptors.

§

InterfaceAssociationDescriptor

Interface Association Descriptor. The usage of this class code triple is defined in the Interface Association Descriptor ECN that is provided on www.usb.org . This class code may only be used in Device Descriptors.

§

WireAdaptorMultifunctionPeripheral

Wire Adapter Multifunction Peripheral programming interface. Definition can be found in the Wireless USB Specification in Chapter 8. This class code may only be used in Device Descriptors.

§

CableBasedAssociationFramework

Cable Based Association Framework. This is defined in the Association Model addendum to the Wireless USB specification. This class code may only be used in Interface Descriptors.

§

RndisOverEthernet

RNDIS over Ethernet.

Connecting a host to the Internet via Ethernet mobile device. The device appears to the host as an Ethernet gateway device. This class code may only be used in Interface Descriptors.

§

RndisOverWifi

RNDIS over WiFi.

Connecting a host to the Internet via WiFi enabled mobile device. The device represents itself to the host as an 802.11 compliant network device. This class code may only be used in Interface Descriptors.

§

RndisOverWiMax

RNDIS over WiMAX

Connecting a host to the Internet via WiMAX enabled mobile device. The device is represented to the host as an 802.16 network device.

This class code may only be used in Interface Descriptors.

§

RndisOverWwan

RNDIS over WWAN

Connecting a host to the Internet via a device using mobile broadband, i.e. WWAN (GSM/CDMA).

This class code may only be used in Interface Descriptors.

§

RndisForRawIpv4

RNDIS for Raw IPv4

Connecting a host to the Internet using raw IPv4 via non-Ethernet mobile device. Devices that provide raw IPv4, not in an Ethernet packet, may use this form to in lieu of other stock types.

This class code may only be used in Interface Descriptors.

§

RndisForRawIpv6

RNDIS for Raw IPv6

Connecting a host to the Internet using raw IPv6 via non-Ethernet mobile device. Devices that provide raw IPv6, not in an Ethernet packet, may use this form to in lieu of other stock types.

This class code may only be used in Interface Descriptors.

§

RndisForGprs

RNDIS for GPRS

Connecting a host to the Internet over GPRS mobile device using the device’s cellular radio

§

Usb3VisionControlInterface

USB3 Vision Control Interface

§

Usb3VisionEventInterface

USB3 Vision Event Interface

§

Usb3VisionStreamingInterface

USB3 Vision Streaming Interface

§

StepStreamTransport

STEP. Stream Transport Efficient Protocol for content protection.

§

StepRawStreamTransport

STEP RAW. Stream Transport Efficient Protocol for Raw content protection.

§

CommandInterfaceIad

Command Interface in IAD

§

CommandInterfaceId

Command Interface in Interface Descriptor

§

MediaInterfaceId

Media Interface in Interface Descriptor

§

DeviceFirmwareUpgrade

Device Firmware Upgrade. Device class definition provided on www.usb.org .

§

IrdaBridge

IRDA Bridge device. Device class definition provided on www.usb.org .

§

UsbTestMeasurement

USB Test and Measurement Device. Definition provided in the USB Test and Measurement Class spec found on www.usb.org .

§

UsbTestMeasurementUsbTmc488

USB Test and Measurement Device conforming to the USBTMC USB488 Subclass Specification found on www.usb.org.

Trait Implementations§

Source§

impl Clone for ClassCode

Source§

fn clone(&self) -> ClassCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ClassCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ClassCode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ClassCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> From<(T, u8, u8)> for ClassCode
where T: Into<BaseClass>,

Source§

fn from(triplet: ClassCodeTriplet<T>) -> Self

Converts to this type from the input type.
Source§

impl From<BaseClass> for ClassCode

Source§

fn from(class: BaseClass) -> Self

Converts to this type from the input type.
Source§

impl From<ClassCode> for BaseClass

Source§

fn from(c: ClassCode) -> Self

Converts to this type from the input type.
Source§

impl Hash for ClassCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ClassCode

Source§

fn eq(&self, other: &ClassCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ClassCode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for ClassCode

Source§

impl Eq for ClassCode

Source§

impl StructuralPartialEq for ClassCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,