All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v0.1.2 2023-10-18
- Trim nul chars off the end of descriptor strings.
- Cleaned up
Devices
, the iterator forDeviceList
. - Added IntoIterator for
DeviceList
. Can now do for loops over the device list itself. - Updated fields enum values:
- "C" repr and variants agree with comparable libusb constants.
- Implemented
From
traits for the ones missing them. EndpointDescriptor
now uses theFrom
traits
- Fixed Windows build warning
Initial fork of rusb with modifications from personal fork
This version differs from rusb
in a number of ways:
- Removes the
UsbContext
trait- Consolidates
Context
andGenericContext
types into a single, concreteContext
type. - Now the generic context is just an instance of
Context
with a null inner pointer.
- Consolidates
- The
Device<T>
andDeviceList<T>
no longer need to be generic over theContext
type (since there is now only a single context type), and are now justDevice
andDeviceList
, respectively. - There is a
Port
type which uniquely identified the physical USB port to which a device in the system is attached.- It is a combination of the bus number and ordered list of hub ports
- This helps to uniquely identify a device when multiple ones are attached with the same VID:PID and no serial number or other distinguishing feature.
- Individual ports are comparable and can be converted to/from strings that use the Linux syspath format, like 2-1.4.3.
- The
Speed
type updated:- It can be converted to floating-point speed in Mbps, and directly displayed as such.
- It is ordered and comparable like:
if (device.speed() < Speed::Super) { println!("Plug the device into a faster port");
- Some general cleanup and modernization of the code base.