@startuml namespace book { class MDBook { project_root: PathBuf, template_dir: PathBuf, src_base: PathBuf, dest_base: PathBuf, render_intent: RenderIntent, translations: HashMap, indent_spaces: i32, pub livereload_script: Option, new(project_root) } class book::Book { config: BookConfig, toc: Vec, new(project_root) } class book::Chapter { pub title: String, pub content: Option, src_path: Option, dest_path: Option, pub translation_links: Option>, pub authors: Option>, pub translators: Option>, pub description: Option, pub css_class: Option, new(title, src_path) } } namespace book::bookconfig { class BookConfig { pub dest: PathBuf, pub src: PathBuf, pub title: String, pub subtitle: Option, pub description: Option, pub language: Language, pub authors: Vec, pub translators: Option>, pub publisher: Option, pub number_format: NumberFormat, pub section_names: Vec, pub is_main_book: bool, pub is_multilang: bool, new(project_root) } class Author { name: String, file_as: String, email: Option, new(name) } class Language { name: String, code: String, new(name, code) } class Publisher { name: String, url: Option, logo_src: Option, new(name) } enum NumberFormat { Arabic Roman Word } } namespace book::toc { class TocContent { pub chapter: Chapter, pub sub_items: Option>, pub section: Option>, } enum TocItem { Numbered "TocContent", Unnumbered "TocContent", Unlisted "TocContent", Spacer, } } class Renderer { build(&self, project_root: &PathBuf), render(&self, book_project: &MDBook), } @enduml