Skip to main content

lean_box

Function lean_box 

Source
pub unsafe fn lean_box(n: usize) -> *mut lean_object
Expand description

Box an unsigned integer into a scalar Lean object (lean.h:313).

ยงSafety

Pointer-bit arithmetic only; no memory access. The caller is responsible for ensuring n fits inside usize >> 1 if the value is intended to be recoverable via lean_unbox.