pub enum HookError {
AlreadyExists(usize),
ImageBaseNotFound(ImageError),
AllocationFailed,
ProtectionFailed(i32),
PatchFailed,
RelocationFailed,
ThreadError(ThreadError),
SymbolError(SymbolError),
}Expand description
Errors that can occur during hook operations
Variants§
AlreadyExists(usize)
A hook already exists at the specified address
ImageBaseNotFound(ImageError)
Failed to find the target image base
AllocationFailed
Failed to allocate memory for the trampoline
ProtectionFailed(i32)
Failed to change memory protection
PatchFailed
Failed to patch the target memory
RelocationFailed
Failed to relocate instructions
ThreadError(ThreadError)
Thread manipulation error
SymbolError(SymbolError)
Failed to resolve symbol
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)>
Returns 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()
Source§impl From<ImageError> for HookError
impl From<ImageError> for HookError
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
Source§impl From<SymbolError> for HookError
impl From<SymbolError> for HookError
Source§fn from(source: SymbolError) -> Self
fn from(source: SymbolError) -> Self
Converts to this type from the input type.
Source§impl From<ThreadError> for HookError
impl From<ThreadError> for HookError
Source§fn from(source: ThreadError) -> Self
fn from(source: ThreadError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HookError
impl RefUnwindSafe for HookError
impl Send for HookError
impl Sync for HookError
impl Unpin for HookError
impl UnsafeUnpin 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