use crate::error::VfsResult;
use crate::source::DynSource;
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum VolumeScheme {
Mbr,
Gpt,
Apm,
Vss,
ApfsContainer,
Lvm,
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum VolumeKind {
Partition,
ShadowStore,
Snapshot,
Unallocated,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct VolumeDesc {
pub index: usize,
pub kind: VolumeKind,
pub start: u64,
pub len: u64,
pub type_hint: Option<String>,
pub label: Option<String>,
}
pub trait VolumeSystem: Send + Sync {
fn scheme(&self) -> VolumeScheme;
fn volumes(&self) -> &[VolumeDesc];
fn open_volume(&self, index: usize) -> VfsResult<DynSource>;
#[cfg(feature = "findings")]
fn findings(&self) -> VfsResult<Vec<forensicnomicon::report::Finding>> {
Ok(Vec::new())
}
}