usecrate::defs::HookHandler;usestd::collections::HashMap;/// A breakpoint object
/// Contains information about the hooked function, and the hooking function
pubstructBreakpoint{/// Original byte of the breakpoint. Used to restore the process after removal of the breakpoint
puboriginal_byte:u8,
/// Hook handler function. When the breakpoint is called, this is what gets executed
pubhandler: HookHandler,
/// Hooked function module name
pubmodule_name: String,
/// Hooked function export name
pubexport_name: String,
}implBreakpoint{/// Creates a new breakpoint
pubfnnew(original_byte:u8, handler: HookHandler, module: String, export: String)->Self{Self{
original_byte,
handler,
module_name: module,
export_name: export,}}}/// Small helper type
pubtypeBreakpointMap=HashMap<usize, Breakpoint>;/// Small helper type
pubtypeModuleBaseCache=HashMap<String, usize>;