pub enum HookError {
InvalidParameter,
MemoryProtect(u32),
MemoryAllocation(u32),
MemorySearching,
MemoryLayoutFormat,
Disassemble,
MoveCode,
PreHook,
Io(Error),
Unknown,
}
Expand description
Hook errors.
Variants§
InvalidParameter
Invalid parameter
MemoryProtect(u32)
Error occurs when modifying the memory protect
MemoryAllocation(u32)
Can’t allocate memory
MemorySearching
Can’t allocate a memory block between +/-2GB of hooking address
MemoryLayoutFormat
Can’t get memory layout from /proc/${PID}/maps (only in linux)
Disassemble
Can’t disassemble in the specified address
MoveCode
Can’t move code
PreHook
The pre-hook callback failed
Io(Error)
Some io error
Unknown
Unknown error
Trait Implementations§
source§impl Error for HookError
impl Error for HookError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()