pub struct LambdaRegistry { /* private fields */ }Expand description
Maps JIT code pointers to human-readable lambda names.
Populated during compilation, queried during execution to identify which closure is being called when debugging crashes.
Implementations§
Source§impl LambdaRegistry
impl LambdaRegistry
pub fn new() -> Self
Sourcepub fn register(&mut self, code_ptr: usize, name: String)
pub fn register(&mut self, code_ptr: usize, name: String)
Register a lambda’s code pointer and name.
Sourcepub fn lookup_by_address(&self, addr: usize) -> Option<&str>
pub fn lookup_by_address(&self, addr: usize) -> Option<&str>
Look up a lambda name by an address within its body. Finds the entry point <= addr that is closest to addr.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Default for LambdaRegistry
impl Default for LambdaRegistry
Source§fn default() -> LambdaRegistry
fn default() -> LambdaRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LambdaRegistry
impl RefUnwindSafe for LambdaRegistry
impl Send for LambdaRegistry
impl Sync for LambdaRegistry
impl Unpin for LambdaRegistry
impl UnsafeUnpin for LambdaRegistry
impl UnwindSafe for LambdaRegistry
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