embassy-usb

Crates

git

Versions

default

Flavors

Skip to main content

ClassMatch

Trait ClassMatch 

Source
pub trait ClassMatch {
    const NAME: &'static str;
    const CODE: Option<ClassCode> = None;

    // Required method
    fn matches(iface: &InterfaceDescriptor) -> bool;
}
Expand description

Pure, synchronous interface matching for a host class.

Used by ConfigurationDescriptorChain::find_interface and ConfigurationDescriptorChain::find_interfaces. Vendor-specific classes can match on interface_class == 0xff here and check VID/PID in HostClass::probe.

Required Associated Constants§

Source

const NAME: &'static str

Human-readable class name.

Provided Associated Constants§

Source

const CODE: Option<ClassCode> = None

Standard class code, when the class has one.

Required Methods§

Source

fn matches(iface: &InterfaceDescriptor) -> bool

Return true when iface belongs to this class.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ClassMatch for CcidMatcher

Source§

const NAME: &'static str = "CCID"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for CdcAcmMatcher

Source§

const NAME: &'static str = "CDC ACM"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for Ch34xMatcher

Source§

const NAME: &'static str = "CH34x"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for Cp210xMatcher

Source§

const NAME: &'static str = "CP210x"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for EcmMatcher

Source§

const NAME: &'static str = "CDC-ECM"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for FtdiMatcher

Source§

const NAME: &'static str = "FTDI"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for GipMatcher

Source§

const NAME: &'static str = "GIP"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for HidMatcher

Source§

const NAME: &'static str = "HID"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for HubMatcher

Source§

const NAME: &'static str = "HUB"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for MidiMatcher

Source§

const NAME: &'static str = "MIDI"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for MscMatcher

Source§

const NAME: &'static str = "MSC"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for PrinterMatcher

Source§

const NAME: &'static str = "Printer"

Source§

const CODE: Option<ClassCode>

Source§

impl ClassMatch for UacMatcher

Source§

const NAME: &'static str = "UAC"

Source§

const CODE: Option<ClassCode>