Skip to main content

Module string_obj

Module string_obj 

Source
Expand description

Refcounted, repr(C) string for v2 runtime.

§Memory layout (24 bytes)

Offset  Size  Field
------  ----  -----
  0       8   header (HeapHeader)
  8       8   data (*const u8, UTF-8 bytes, NOT null-terminated)
 16       4   len (u32, byte count)
 20       4   _pad (u32)

Structs§

StringObj
Refcounted, repr(C) string for v2 runtime. Total: 24 bytes (header 8 + data ptr 8 + len 4 + pad 4).