#[non_exhaustive]pub enum Error {
ModuleNotLoaded {
module: &'static str,
},
BuildMismatch {
module: &'static str,
found: Build,
expected: &'static [Build],
},
InvalidImage {
module: &'static str,
},
NotInitialized {
module: &'static str,
},
VerificationFailed(Box<Mismatch>),
NotInBuild {
module: &'static str,
item: &'static str,
build: &'static str,
scan: Option<Error>,
},
AlreadyHooked {
module: &'static str,
rva: u32,
},
Hook {
module: &'static str,
rva: u32,
source: Error,
},
UnsupportedPlatform,
}Expand description
Everything that can go wrong finding a module or hooking a function.
Messages name the module, and the address relative to its base where one is involved.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ModuleNotLoaded
The module is not loaded in this process.
BuildMismatch
The loaded module is none of the builds the bindings accept.
Fields
InvalidImage
The loaded module’s headers could not be read.
NotInitialized
The module has not been initialized; call its init first.
VerificationFailed(Box<Mismatch>)
A function does not start with the bytes the bindings expect, and
nothing else found it; see Mismatch.
NotInBuild
The loaded build’s IR lacks the function, and neither the byte pattern of a build that has it nor its class’s vtable found it.
Fields
AlreadyHooked
The function is already hooked by this mod: a Hook for
it is still alive.
Fields
Hook
The hooking engine failed to install, enable or disable a hook.
Fields
UnsupportedPlatform
This platform is not supported; only Windows is.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()