use std::io;
pub type Result<T> = ::std::result::Result<T, Error>;
#[derive(Debug, Fail)]
pub enum Error {
#[fail(display = "address must not be null")]
Null,
#[fail(display = "address does not contain allocated memory")]
Free,
#[fail(display = "invalid procfs source input")]
ProcfsInput,
#[fail(display = "{}", _0)]
ProcfsIo(#[cause] io::Error),
#[fail(display = "system call failed with: {}", _0)]
SystemCall(::errno::Errno),
#[fail(display = "macOS kernel call failed with: {}", _0)]
MachRegion(::libc::c_int),
}
impl From<io::Error> for Error {
fn from(error: io::Error) -> Self {
Error::ProcfsIo(error)
}
}