Expand description
List system USB buses and devices; a modern lsusb that attempts to maintain compatibility with, but also add new features.
§Examples
Profile USB devices on cross-platform systems:
use cyme::profiler;
let sp_usb = profiler::get_spusb().unwrap();Profile USB devices with all extra descriptor data (requires opening devices) on cross-platform systems:
use cyme::profiler;
let sp_usb = profiler::get_spusb_with_extra().unwrap();It’s often useful to then flatten this into a list of devices (profiler::Device):
// flatten since we don't care tree/buses
let devices = sp_usb.flattened_devices();
for device in devices {
format!("{}", device);
}One can then print with the cyme display module:
use cyme::display;
// print with default [`display::PrintSettings`]
display::DisplayWriter::default().print_flattened_devices(&devices, &display::PrintSettings::default());The profiler::SystemProfile struct contains system profiler::Buss, which contain profiler::Devices as a USB tree.
Modules§
- colour
- Colouring of cyme output
- config
- Config for cyme binary
- display
- Provides the main utilities to display USB types within this crate - primarily used by
cymebinary. - error
- Error type used within crate with From for commonly used crate errors
- icon
- Icons and themeing of cyme output
- lsusb
- Methods to print system USB information in lsusb style
- profiler
- System USB profiler for getting system USB information, devices and descriptors
- types
- Types used in crate non-specific to a module
- udev
- Utilities to get device information using udev - only supported on Linux. Requires ‘udev’ feature.
- usb
- Defines for USB, mainly thosed covered at usb.org