use crate::devices::DeviceError;
pub trait VolumeOps {
type Guard: Send;
fn prepare_for_io(path: &str, auto_unmount: bool) -> Result<Self::Guard, DeviceError>;
fn unmount_volumes(path: &str) -> Result<Vec<String>, DeviceError>;
fn preflight_for_io(path: &str, auto_unmount: bool) -> Result<(), DeviceError> {
let _guard = Self::prepare_for_io(path, auto_unmount)?;
let _ = _guard;
Ok(())
}
}