verity_memory/errors/
write_memory.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

#[derive(Debug, PartialEq)]
pub enum WriteMemoryError {
    NullPointer,
    InvalidAlignment,
    InvalidAccess,
    FailedToChangeProtection,
    FailedToRestoreProtection
}

impl std::fmt::Display for WriteMemoryError {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        write!(f, "{:?}", self)
    }
}

impl std::error::Error for WriteMemoryError {}