Skip to main content

Crate nvme_amz

Crate nvme_amz 

Source
Expand description

A Rust library to probe NVMe devices in Amazon EC2.

It provides functionality similar to that of the ebsnvme-id command but adds information about instance store devices, not only EBS.

The library implements TryFrom<File> for Nvme, to use as the constructor.

§Example

use std::env::args;
use std::fs::File;

use nvme_amz::Nvme;

fn main() {
    let path = args().nth(1).expect("device path required");
    let file = File::open(path).expect("unable to open device");
    let nvme: Nvme = file.try_into().expect("unable to probe device");
    println!("{:?}", nvme);
    let name = nvme.name();
    println!("name: {}", name);
}

Structs§

Names
A structure containing vendor-specific device names.
Nvme
An NVMe device, containing a subset of all identifying information.
VendorId
The vendor ID of the NVMe device.

Enums§

Error
The error type for this crate.
Model
The model of the NVMe device.