Skip to main content

dope_core/driver/storage/
removal.rs

1use dope_sys::engine;
2
3use crate::{
4    RemoveSlot,
5    driver::result::{IoOperation, Kernel},
6};
7
8#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9pub struct Removal {
10    operation: IoOperation,
11    slot: RemoveSlot,
12    cause: Kernel,
13}
14
15impl<S> Removal
16where
17    crate::Backend: engine::Removal<Slot = S>,
18{
19    pub(crate) fn native(((op, cause), slot): ((IoOperation, Kernel), S)) -> Self {
20        Self {
21            operation: op,
22            slot,
23            cause,
24        }
25    }
26}