pub struct Replacement {
pub library: Option<Vec<u8>>,
pub symbol: Symbol,
pub replacement: *const c_void,
pub required: bool,
}Expand description
A requested slot replacement.
library optionally scopes the match to one providing DLL (case-insensitive);
symbol names the import; replacement is the new function pointer. When
required is set, install fails if the symbol is not imported by the
module; otherwise a missing symbol is silently skipped — the behavior the
hookfs install layer needs when applying its superset of candidate hooks.
Fields§
§library: Option<Vec<u8>>Optional providing-DLL filter (ASCII, case-insensitive).
symbol: SymbolThe symbol to rebind.
replacement: *const c_voidThe replacement function pointer.
required: boolFail the install if this symbol is not present (vs. skip it).
Implementations§
Source§impl Replacement
impl Replacement
Sourcepub fn by_name(library: &str, symbol: &str, replacement: *const c_void) -> Self
pub fn by_name(library: &str, symbol: &str, replacement: *const c_void) -> Self
A required by-name replacement in a specific library.
Trait Implementations§
Source§impl Debug for Replacement
impl Debug for Replacement
impl Send for Replacement
Replacement holds a raw function pointer, which is !Send by default; the
pointer is a process-global code address safe to move between threads.