[−][src]Function bts::register
pub fn register<P: AsRef<Path>>(
args: RegisterArgs,
config_location: P
) -> Result<(), Error>
Register a new snippet
Allows to create new snipped from existing files.
example:
use bts::args::RegisterArgs; use bts::register; let args = RegisterArgs { template_name: "cargo/amethyst".to_string(), target_path: "/home/rustcean/Projects/my_template_project".into(), max_depth: 8, ..Default::default() }; register(args, "/home/rustcean/.bts").expect("snippet was registered");