disk-types 0.1.5

Common traits and types for handling block devices, partitions, file systems, etc.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::fs::FileSystem;
use std::io;
use std::path::Path;
use std::process::{Command, ExitStatus, Stdio};

pub trait Fscker {
    fn fsck(path: &Path, fs: FileSystem) -> Result<(), FsckError>;
}

#[derive(Debug, Error)]
pub enum FsckError {
    #[error(display = "fsck I/O error: {:?}", _0)]
    Io(io::Error),
    #[error(display = "command failed with exit status: {}", _0)]
    BadStatus(ExitStatus),
}