Provides an builder API to assist in generating Rust code.
More information about this crate can be found in the crate documentation
codegen, first add this to your
 = "0.2.0"
Next, add this to your crate:
extern crate codegen;
- Create a
- Use the builder API to add elements to the scope.
Scope::to_string()to get the generated code.
use Scope; let mut scope = new; scope.new_struct .derive .field .field; println!;
codegen will not attempt to perform anything beyond basic formatting. For
improved formatting, the generated code can be passed to
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in
codegen by you, shall be licensed as MIT, without any
additional terms or conditions.