Struct mdbook::book::BookBuilder
[−]
[src]
pub struct BookBuilder { /* fields omitted */ }
A helper for setting up a new book and its directory structure.
Methods
impl BookBuilder
[src]
pub fn new<P: Into<PathBuf>>(root: P) -> BookBuilder
[src]
Create a new BookBuilder
which will generate a book in the provided
root directory.
pub fn with_config(&mut self, cfg: Config) -> &mut BookBuilder
[src]
Set the Config
to be used.
pub fn config(&self) -> &Config
[src]
Get the config used by the BookBuilder
.
pub fn copy_theme(&mut self, copy: bool) -> &mut BookBuilder
[src]
Should the theme be copied into the generated book (so users can tweak it)?
pub fn create_gitignore(&mut self, create: bool) -> &mut BookBuilder
[src]
Should we create a .gitignore
file?
pub fn build(&self) -> Result<MDBook>
[src]
Generate the actual book. This will:
- Create the directory structure.
- Stub out some dummy chapters and the
SUMMARY.md
. - Create a
.gitignore
(if applicable) - Create a themes directory and populate it (if applicable)
- Generate a
book.toml
file, - Then load the book so we can build it or run tests.
Trait Implementations
impl Debug for BookBuilder
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for BookBuilder
[src]
fn clone(&self) -> BookBuilder
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for BookBuilder
[src]
fn eq(&self, __arg_0: &BookBuilder) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &BookBuilder) -> bool
[src]
This method tests for !=
.