Skip to main content

emit_field_setter

Function emit_field_setter 

Source
fn emit_field_setter(
    out: &mut String,
    builder_var: &str,
    field: &FieldDef,
    value_expr: &str,
    indent: &str,
    enums: &[EnumDef],
    structs: &[StructDef],
    counter: &mut u32,
)
Expand description

Emit a setter call for a field on a builder variable.

counter is a per-function gensym counter. Each List(Struct) field claims the next ID (_sl{n}, _sv{n}, _si{n}) and increments the counter, guaranteeing unique variable names across all nesting levels within a single builder function.