Skip to main content

heap_describe

Function heap_describe 

Source
pub unsafe fn heap_describe(ptr: *const u8) -> String
Expand description

Describes a heap object in human-readable form.

Returns a string like:

  • Lit(Int#, 42)
  • Con(tag=12345, 2 fields)
  • Closure(code=0x..., 3 captures) [repl_lambda_5]
  • INVALID(tag=255, ptr=0x...)

ยงSafety

ptr must point to a valid heap object, or at least readable memory.