Skip to main content

emit_le_binary_rust

Function emit_le_binary_rust 

Source
pub fn emit_le_binary_rust(
    ir: &WesleyIR,
    operations: &[SchemaOperation],
    codec_import_path: &str,
) -> String
Expand description

Emit a Rust LE-binary codec for the data types in ir.

Enums, input objects, and output objects each get an encode_* / decode_* pair; operation root types (Query / Mutation / Subscription) are skipped as data types but their variables get a codec. The codec imports Writer, Reader, and CodecError from codec_import_path.