mdBook/src/book/bookconfig.rs

37 lines
645 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,
multilingual: bool,
}
impl BookConfig {
pub fn new() -> Self {
BookConfig {
dest: PathBuf::from("book"),
src: PathBuf::from("src"),
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
}
}