nvme/ds/
uuid.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
use modular_bitfield::prelude::*;

#[bitfield(bits = 7)]
#[derive(BitfieldSpecifier)]
pub struct UuidIndex(B7);

impl From<Option<UuidIndex>> for UuidIndex {
    fn from(o: Option<UuidIndex>) -> Self {
        match o {
            Some(u) => u,
            None => UuidIndex::new().with_0(0),
        }
    }
}