static void appendImplWriterForComposite(
        final Appendable out,
        final int level,
        final String name) throws IOException
    {
        // impl Decoder...
        indent(out, level, "impl<'a, P> Writer<'a> for %s<P> where P: Writer<'a> + Default {\n", name);
        indent(out, level + 1, "#[inline]\n");
        indent(out, level + 1, "fn get_buf_mut(&mut self) -> &mut WriteBuf<'a> {\n");
        indent(out, level + 2, "if let Some(parent) = self.parent.as_mut() {\n");
        indent(out, level + 3, "parent.get_buf_mut()\n");
        indent(out, level + 2, "} else {\n");
        indent(out, level + 3, "panic!(\"parent was None\")\n");
        indent(out, level + 2, "}\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