Skip to main content

Module heap_variants

Module heap_variants 

Source
Expand description

Single source of truth for HeapValue variants.

define_heap_types! generates:

  • HeapValue enum
  • HeapKind enum (discriminant)
  • HeapValue::kind() method
  • HeapValue::is_truthy() method
  • HeapValue::type_name() method

equals(), structural_eq(), and Display remain hand-written because they have complex per-variant logic (e.g. cross-type numeric comparison).