Skip to main content

emit_decode_function

Function emit_decode_function 

Source
pub fn emit_decode_function(
    out: &mut String,
    def: &ValidatedDef,
    tree: &DecodeNode,
    itype_prefix: &str,
)
Expand description

Generate the Python _decode(data) function body using the decision tree.

Returns the complete function as a string. The function returns (itype_const, fields_dict, byte_size) or None.