Enum minhook::Error
[−]
[src]
pub enum Error { AlreadyInitialized, NotInitialized, AlreadyCreated, NotCreated, AlreadyEnabled, Disabled, NotExecutable, UnsupportedFunction, MemoryAlloc, MemoryProtect, ModuleNotFound, FunctionNotFound, InvalidModuleName, InvalidFunctionName, }
The error type for all hooking operations.
MinHook error status codes map directly to this type.
Variants
AlreadyInitialized
MinHook is already initialized.
NotInitialized
MinHook is not initialized yet, or already uninitialized.
AlreadyCreated
The hook for the specified target function is already created.
NotCreated
The hook for the specified target function is not created yet.
AlreadyEnabled
The hook for the specified target function is already enabled.
Disabled
The hook for the specified target function is not enabled yet, or already disabled.
NotExecutable
The specified pointer is invalid. It points the address of non-allocated and/or non-executable region.
UnsupportedFunction
The specified target function cannot be hooked.
MemoryAlloc
Failed to allocate memory.
MemoryProtect
Failed to change the memory protection.
ModuleNotFound
The specified module is not loaded.
FunctionNotFound
The specified function is not found.
InvalidModuleName
The specified module name is invalid.
InvalidFunctionName
The specified function name is invalid.
Methods
impl Error
[src]
fn from_status(status: MH_STATUS) -> Option<Error>
Constructs an Error
from a MinHook status.
Trait Implementations
impl PartialEq for Error
[src]
fn eq(&self, __arg_0: &Error) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Eq for Error
[src]
impl Debug for Error
[src]
impl Copy for Error
[src]
impl Clone for Error
[src]
fn clone(&self) -> Error
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Error for Error
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0
The lower-level cause of this error, if any. Read more