pub enum HookError {
InvalidParameter,
MemoryProtect(u32),
MemoryAllocation(u32),
MemorySearching,
MemoryLayoutFormat,
Disassemble,
MoveCode,
MovingCodeNotSupported,
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
MovingCodeNotSupported
Not supported moving 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()
Auto Trait Implementations§
impl !RefUnwindSafe for HookError
impl Send for HookError
impl Sync for HookError
impl Unpin for HookError
impl !UnwindSafe for HookError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more