embassy-usb-host

Crates

git

Versions

default

Flavors

USBDescriptor

Trait USBDescriptor 

Source
pub trait USBDescriptor {
    type Error;

    const SIZE: usize;
    const DESC_TYPE: u8;

    // Required method
    fn try_from_bytes(bytes: &[u8]) -> Result<Self, Self::Error>
       where Self: Sized;
}
Expand description

Trait for fixed-size USB descriptors that can be parsed from a byte slice.

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn try_from_bytes(bytes: &[u8]) -> Result<Self, Self::Error>
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§