pub struct Hook<Ctx> { /* private fields */ }Trait Implementations§
Auto Trait Implementations§
impl<Ctx> !Freeze for Hook<Ctx>
impl<Ctx> RefUnwindSafe for Hook<Ctx>where
Ctx: RefUnwindSafe + UnwindSafe,
impl<Ctx> Send for Hook<Ctx>where
Ctx: Send,
impl<Ctx> Sync for Hook<Ctx>
impl<Ctx> Unpin for Hook<Ctx>where
Ctx: Unpin,
impl<Ctx> UnsafeUnpin for Hook<Ctx>where
Ctx: UnsafeUnpin,
impl<Ctx> UnwindSafe for Hook<Ctx>where
Ctx: UnwindSafe,
Blanket Implementations§
impl<T> Any for Twhere
T: ?Sized,
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
Source§impl<J, D> JitAlloc for D
impl<J, D> JitAlloc for D
Source§fn alloc(&self, size: usize) -> Result<(*const u8, *mut u8), JitAllocError>
fn alloc(&self, size: usize) -> Result<(*const u8, *mut u8), JitAllocError>
Allocates
size bytes in the executable memory region.
Returns two pointers. One points to Read-Execute mapping and another to Read-Write mapping.
All code writes must go to the Read-Write mapping.Source§unsafe fn release(&self, rx_ptr: *const u8) -> Result<(), JitAllocError>
unsafe fn release(&self, rx_ptr: *const u8) -> Result<(), JitAllocError>
Releases the memory allocated by
alloc. Read moreSource§unsafe fn flush_instruction_cache(&self, rx_ptr: *const u8, size: usize)
unsafe fn flush_instruction_cache(&self, rx_ptr: *const u8, size: usize)
Flushes the instruction cache for (at least) the given slice of executable memory. Should be
called after the JIT memory is ready to be executed. Read more
Source§unsafe fn protect_jit_memory(
&self,
ptr: *const u8,
size: usize,
access: ProtectJitAccess,
)
unsafe fn protect_jit_memory( &self, ptr: *const u8, size: usize, access: ProtectJitAccess, )
On hardened architectures with
MAP_JIT-like memory flags, set the access for the current
thread. Read more