nvme/ds/controller/mod.rs
1use modular_bitfield::prelude::*;
2
3#[bitfield(bits = 16)]
4#[derive(BitfieldSpecifier)]
5#[repr(transparent)]
6pub struct ControllerId(u16);
7
8impl From<u16> for ControllerId {
9 fn from(x: u16) -> Self {
10 ControllerId::new().with_0(x)
11 }
12}
13
14impl From<ControllerId> for u16 {
15 fn from(c: ControllerId) -> Self {
16 c.get_0()
17 }
18}
19
20pub mod properties;