-
Notifications
You must be signed in to change notification settings - Fork 2
/
adapters.rs
27 lines (22 loc) · 853 Bytes
/
adapters.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use vki::Instance;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let _ = pretty_env_logger::try_init();
let instance = Instance::new()?;
println!("Instance version: {:?}", instance.version());
println!();
for adapter in instance.enumerate_adapters()?.iter() {
let properties = adapter.properties();
println!("Adapter Name: {:?}", adapter.name());
println!("API Version: {:?}", properties.api_version);
println!(
"Driver Version: {:?} ({})",
properties.driver_version_string(),
properties.driver_version
);
println!("Device Type: {:?}", properties.device_type);
println!("Device ID: {:?}", properties.device_id);
println!("Vendor ID: {:?}", properties.vender_id);
println!();
}
Ok(())
}