iftree 1.0.0

Include many files in your Rust code for self-contained binaries.
Documentation
use std::cmp;
use std::path;

#[derive(serde::Deserialize)]
#[serde(deny_unknown_fields)]
pub struct Configuration {
    pub paths: String,
    pub base_folder: Option<path::PathBuf>,
    pub root_folder_variable: Option<String>,
    pub template: Option<Template>,
    pub debug: Option<bool>,
}

#[derive(serde::Deserialize)]
#[serde(deny_unknown_fields, untagged)]
pub enum Template {
    Default {
        initializer: Option<Path>,
        identifiers: Option<bool>,
    },
    Visitors(Vec<CustomVisitor>),
}

#[derive(cmp::PartialEq, Debug)]
pub struct Path(pub syn::Path);

#[derive(serde::Deserialize)]
#[serde(deny_unknown_fields)]
pub struct CustomVisitor {
    pub visit_base: Option<Path>,
    pub visit_folder: Option<Path>,
    pub visit_file: Path,
}