MCPcopy Create free account
hub / github.com/dcSpark/cddl-codegen / make_keyed_map_variant_deser_code

Function make_keyed_map_variant_deser_code

src/generation.rs:7753–7804  ·  view source on GitHub ↗

Full deserialization body for a collapsed map-rep group-choice arm that carries a fixed key: len-check, key read+verify, value read, final len-check, and the variant constructor. The map holds exactly one pair (key + value), so the length check is `Fixed(1)`. Used by both enum dispatch paths (type-match arm body / brute-force closure body).

(
    gen_scope: &mut GenerationScope,
    types: &IntermediateTypes,
    name: &RustIdent,
    variant: &EnumVariant,
    key: &FixedValue,
    enum_gen_info: &EnumVariantInRust,
    cli: &Cli,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

generate_enumFunction · 0.85

Calls 9

encoding_var_names_strFunction · 0.85
surround_in_len_checksFunction · 0.85
name_as_varMethod · 0.80
rust_typeMethod · 0.80
generate_deserializeMethod · 0.80
add_to_codeMethod · 0.80
lineMethod · 0.80
generate_constructorMethod · 0.80

Tested by

no test coverage detected