Skip to main content

object

Function object 

Source
pub fn object(
    out: &mut CodeValue,
    keys: &[&'static CStr],
    values: &mut SlotBuffer,
)
Expand description

Write an Object into out from parallel keys and values (a SlotBuffer built the same way [array] expects). code_object copies both the key pointers and the key bytes into the value’s own storage (since 2026-08-29), so the &'static CStr bound is stricter than the ABI needs — it is the ergonomic path for the common case of literal field names (c"status", c"body"). For names built at runtime — a parsed JSON object, a database row — use object_dyn.