[][src]Function bts::new

pub fn new<P: AsRef<Path>>(
    args: NewArgs,
    config_location: P
) -> Result<(), Error>

Instantiate snippet at given location

Allows to generate a snipped from preexisting template. In short, it's more complicated deep copy function.

example

use bts::args::NewArgs;
use bts::new;

let args = NewArgs {
    template_name: "cargo/bin".to_string(),
    target_path: Some("/home/rustcean/Projects/my_awesome_project".into()),
    max_depth: 8,
    ..Default::default()
};

new(args, "/home/rustcean/.bts").expect("snippet was instantiated");