TODO: should this be public?
(raw: RawDevice)
| 57 | |
| 58 | // TODO: should this be public? |
| 59 | pub(crate) fn from_raw_device(raw: RawDevice) -> Device { |
| 60 | let state = DeviceState::new(&raw); |
| 61 | let prev_state = state.clone(); |
| 62 | |
| 63 | Device { |
| 64 | raw, |
| 65 | prev_state, |
| 66 | state, |
| 67 | block_dropped: false, |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | /// Returns the synchronization engine's current understanding (cache) of the device state. |
| 72 | /// |