pub struct DescriptorWriter<'a> { /* private fields */ }
Expand description

A writer for USB descriptors.

Implementations

Gets the current position in the buffer, i.e. the number of bytes written so far.

Writes an arbitrary (usually class-specific) descriptor.

Writes a interface descriptor.

Arguments
  • number - Interface number previously allocated with UsbBusAllocator::interface.
  • interface_class - Class code assigned by USB.org. Use 0xff for vendor-specific devices that do not conform to any class.
  • interface_sub_class - Sub-class code. Depends on class.
  • interface_protocol - Protocol code. Depends on class and sub-class.

Writes an endpoint descriptor.

Arguments

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.