private static void generateComposite(
        final String schemaVersionType,
        final List<Token> tokens,
        final RustOutputManager outputManager) throws IOException
    {
        final Token token = tokens.get(0);
        final String compositeName = token.applicableTypeName();
        final String compositeModName = codecModName(compositeName);

        try (Writer out = outputManager.createOutput(compositeModName))
        {
            indent(out, 0, "use crate::*;\n\n");

            indent(out, 0, "pub use encoder::%sEncoder;\n", formatStructName(compositeName));
            indent(out, 0, "pub use decoder::%sDecoder;\n\n", formatStructName(compositeName));

            final int encodedLength = tokens.get(0).encodedLength();
            if (encodedLength > 0)
            {
                indent(out, 0, "pub const ENCODED_LENGTH: usize = %d;\n\n", encodedLength);
            }

            generateCompositeEncoder(tokens, encoderName(compositeName), out);
            indent(out, 0, "\n");
            generateCompositeDecoder(schemaVersionType, tokens, decoderName(compositeName), out);
        }
    }
Create a new Rust language {@link CodeGenerator}.

@param ir            for the messages and types.
@param crateVersion  for the generated crate.
@param outputManager for generating the codecs to.
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust/RustGenerator.java