[−][src]Crate cargo_toml_builder
Cargo.toml Builder
Programmatically create Cargo.toml files
Example
extern crate cargo_toml_builder; use cargo_toml_builder::prelude::*; let cargo_toml = CargoToml::builder() .name("my-project") .version("1.0.0") .author("Alice Smith <asmith@example.com>") .dependency("env_logger".version("0.5.6")) .build()?; assert_eq!(cargo_toml.to_string(), r#" [package] name = "my-project" version = "1.0.0" authors = ["Alice Smith <asmith@example.com>"] [dependencies] env_logger = "0.5.6" "#);
Modules
prelude | Use the glob import from this module to pull in the most common traits & types needed to work with the builder |
types | Includes all types used by the builder |
Structs
CargoToml | Main builder struct |
Error | Represents various errors that can occur |