static void generateEncoderTraits(final Writer writer) throws IOException
    {
        indent(writer, 0, "pub trait Writer<'a>: Sized {\n");
        indent(writer, 1, "fn get_buf_mut(&mut self) -> &mut WriteBuf<'a>;\n");
        indent(writer, 0, "}\n\n");

        indent(writer, 0, "pub trait Encoder<'a>: Writer<'a> {\n");
        indent(writer, 1, "fn get_limit(&self) -> usize;\n");
        indent(writer, 1, "fn set_limit(&mut self, limit: usize);\n");
        indent(writer, 0, "}\n\n");
    }
Create a new 'lib.rs' for the library being generated.

@param outputManager     for generating the codecs to.
@param byteOrder         for the Encoding.
@param schemaVersionType for acting_version type.
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/rust/LibRsDef.java