pub struct SimpleJITProduct { /* private fields */ }Expand description
A SimpleJITProduct allows looking up the addresses of all functions and data objects
defined in the original module.
Implementations§
Source§impl SimpleJITProduct
impl SimpleJITProduct
Sourcepub unsafe fn free_memory(&mut self)
pub unsafe fn free_memory(&mut self)
Free memory allocated for code and data segments of compiled functions.
§Safety
Because this function invalidates any pointers retrived from the
corresponding module, it should only be used when none of the functions
from that module are currently executing and none of the fn pointers
are called afterwards.
Sourcepub fn func_or_data_for_func(&self, name: &str) -> Option<FuncOrDataId>
pub fn func_or_data_for_func(&self, name: &str) -> Option<FuncOrDataId>
Get the FuncOrDataId associated with the given name.
Sourcepub fn lookup_func(&self, func_id: FuncId) -> *const u8
pub fn lookup_func(&self, func_id: FuncId) -> *const u8
Return the address of a function.
Auto Trait Implementations§
impl Freeze for SimpleJITProduct
impl RefUnwindSafe for SimpleJITProduct
impl !Send for SimpleJITProduct
impl !Sync for SimpleJITProduct
impl Unpin for SimpleJITProduct
impl UnsafeUnpin for SimpleJITProduct
impl UnwindSafe for SimpleJITProduct
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