2020-06-05 22:58:14 -04:00
|
|
|
use std::path::{Path, PathBuf};
|
|
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
pub struct Config {
|
|
|
|
pub delimiter: char,
|
|
|
|
pub escape: bool,
|
|
|
|
pub cache_dir: PathBuf,
|
2020-06-06 18:01:15 -04:00
|
|
|
pub rm_whitespace: bool,
|
2020-06-05 22:58:14 -04:00
|
|
|
#[doc(hidden)]
|
2020-06-07 04:58:52 -04:00
|
|
|
pub _non_exhaustive: (),
|
2020-06-05 22:58:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Default for Config {
|
|
|
|
fn default() -> Self {
|
|
|
|
Self {
|
|
|
|
delimiter: '%',
|
|
|
|
escape: true,
|
|
|
|
cache_dir: Path::new(env!("OUT_DIR")).join("cache"),
|
2020-06-06 18:01:15 -04:00
|
|
|
rm_whitespace: false,
|
2020-06-07 04:58:52 -04:00
|
|
|
_non_exhaustive: (),
|
2020-06-05 22:58:14 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: Global configration file
|