pub struct HookWriter<'a> { /* private fields */ }Implementations§
Source§impl HookWriter<'static>
impl HookWriter<'static>
pub const fn from_static() -> Self
Source§impl<'a> HookWriter<'a>
impl<'a> HookWriter<'a>
pub const fn new(arena: &'a dyn CodeArena) -> Self
Sourcepub const fn with_patcher(self, patcher: &'a dyn PatchWriter) -> Self
pub const fn with_patcher(self, patcher: &'a dyn PatchWriter) -> Self
Use patcher to write hooks into their target functions.
pub unsafe fn create_hook_by_name( &self, module: Option<&CStr>, symbol: &CStr, destination: *mut u8, ) -> Result<Hook<'a>>
pub unsafe fn create_hook( &self, target: NonNull<c_void>, destination: NonNull<c_void>, ) -> Result<Hook<'a>>
pub unsafe fn write_hook_table( &self, target: NonNull<c_void>, destination_fn: NonNull<c_void>, ) -> Result<HookData<'a>>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for HookWriter<'a>
impl<'a> !UnwindSafe for HookWriter<'a>
impl<'a> Freeze for HookWriter<'a>
impl<'a> Send for HookWriter<'a>
impl<'a> Sync for HookWriter<'a>
impl<'a> Unpin for HookWriter<'a>
impl<'a> UnsafeUnpin for HookWriter<'a>
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