MCPcopy Index your code
hub / github.com/endbasic/endbasic / heap_index

Method heap_index

core/src/mem.rs:333–338  ·  view source on GitHub ↗

Extracts the heap index from this pointer. Panics if this is not a heap pointer.

(&self)

Source from the content-addressed store, hash-verified

331 ///
332 /// Panics if this is not a heap pointer.
333 pub(crate) fn heap_index(&self) -> usize {
334 match self {
335 DatumPtr::Heap(index) => unchecked_u24_as_usize(*index),
336 DatumPtr::Constant(_) => panic!("Expected a heap pointer"),
337 }
338 }
339}
340
341#[cfg(test)]

Callers 3

array_dataFunction · 0.80
get_array_varMethod · 0.80
resolve_array_indexMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected