static void appendImplEncoderForComposite(
        final Appendable out,
        final int level,
        final String name) throws IOException
    {
        appendImplWriterForComposite(out, level, name);

        // impl Encoder...
        indent(out, level, "impl<'a, P> Encoder<'a> for %s<P> where P: Encoder<'a> + Default {\n", name);
        indent(out, level + 1, "#[inline]\n");
        indent(out, level + 1, "fn get_limit(&self) -> usize {\n");
        indent(out, level + 2, "self.parent.as_ref().expect(\"parent missing\").get_limit()\n");
        indent(out, level + 1, "}\n\n");

        indent(out, level + 1, "#[inline]\n");
        indent(out, level + 1, "fn set_limit(&mut self, limit: usize) {\n");
        indent(out, level + 2, "self.parent.as_mut().expect(\"parent missing\").set_limit(limit);\n");
        indent(out, level + 1, "}\n");
        indent(out, level, "}\n\n");
    }
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