mdBook/src/book/bookconfig.rs

39 lines
699 B
Rust
Raw Normal View History

2015-07-17 00:20:36 +08:00
use std::path::PathBuf;
pub struct BookConfig {
dest: PathBuf,
src: PathBuf,
indent_spaces: i32,
2015-07-17 00:20:36 +08:00
multilingual: bool,
}
impl BookConfig {
pub fn new() -> Self {
BookConfig {
dest: PathBuf::from("book"),
src: PathBuf::from("src"),
indent_spaces: 4,
2015-07-17 00:20:36 +08:00
multilingual: false,
}
}
pub fn dest(&self) -> PathBuf {
self.dest.clone()
}
pub fn set_dest(mut self, dest: PathBuf) -> Self {
self.dest = dest;
self
}
pub fn src(&self) -> PathBuf {
self.src.clone()
}
pub fn set_src(mut self, src: PathBuf) -> Self {
self.src = src;
self
}
}