Crates.io | usbenum |
lib.rs | usbenum |
version | 0.1.0 |
source | src |
created_at | 2021-08-23 06:52:49.050524 |
updated_at | 2021-08-23 06:52:49.050524 |
description | A cross platform library that can enumerate USB devices currently connected and get connection history |
homepage | |
repository | https://github.com/marirs/usbenum |
max_upload_size | |
id | 441010 |
size | 26,813 |
Usb Enumeration is a cross-platform library that can enumerate USB devices currently connected and get connection history
[dependencies]
usbenum = "0.1.0"
and then
use usbenum::list_connected_usb_drives;
fn main() {
match list_connected_usb_drives() {
Ok(l) => {
if l.is_empty() {
println!("No currently connected usb drives")
} else {
println!("{:#?}", l)
}
}
Err(e) => println!("{:?}", e),
}
}
cargo run --example connected_drives
License: MIT