1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use failure;
pub type Result<T> = ::std::result::Result<T, failure::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] ::std::io::Error),
#[fail(display = "system call failed with: {}", _0)]
SystemCall(::errno::Errno),
#[fail(display = "macOS kernel call failed with: {}", _0)]
MachRegion(::libc::c_int),
}