Expand description
Swift decoding statement generation.
Generates Swift code that decodes byte arrays into Rust types.
Functionsยง
- generate_
decode_ closure - Generate a Swift decode closure for use with decodeVec, decodeOption, etc.
- generate_
decode_ stmt - Generate a Swift decode statement for a given shape.
Returns code that decodes from
payloadatcursorinto a variable namedvar_name. - generate_
decode_ stmt_ from - Generate a Swift decode statement for a given shape from a specific data variable.
Returns code that decodes from
data_varatcursorinto a variable namedvar_name. - generate_
decode_ stmt_ from_ with_ cursor - Generate a Swift decode statement for a given shape from a specific data variable and using a custom cursor variable name.
- generate_
decode_ stmt_ with_ cursor - Generate a Swift decode statement for a given shape using a custom cursor variable name.
- generate_
inline_ decode - Generate inline decode expression (for use in closures).
- swift_
decode_ fn - Get the Swift decode function name for a scalar type.