Skip to main content

lean_string_byte_size

Function lean_string_byte_size 

Source
pub unsafe fn lean_string_byte_size(o: *mut lean_object) -> usize
Expand description

Total allocation footprint of o (lean.h:1170).

§Safety

Same as lean_string_size.

§Panics

Panics if size_of::<LeanStringObjectRepr>() + capacity overflows usize. The string came from a valid Lean allocation so the sum cannot realistically overflow; the panic surfaces a corrupted header rather than a recoverable condition.