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]
impl BookBuilder
pub fn new<P: Into<PathBuf>>(root: P) -> BookBuilder
[src]
pub fn new<P: Into<PathBuf>>(root: P) -> BookBuilder
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]
pub fn with_config(&mut self, cfg: Config) -> &mut BookBuilder
Set the Config
to be used.
pub fn config(&self) -> &Config
[src]
pub fn config(&self) -> &Config
Get the config used by the BookBuilder
.
pub fn copy_theme(&mut self, copy: bool) -> &mut BookBuilder
[src]
pub fn copy_theme(&mut self, copy: bool) -> &mut BookBuilder
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]
pub fn create_gitignore(&mut self, create: bool) -> &mut BookBuilder
Should we create a .gitignore
file?
pub fn build(&self) -> Result<MDBook>
[src]
pub fn build(&self) -> Result<MDBook>
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]
impl Debug for BookBuilder
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for BookBuilder
[src]
impl Clone for BookBuilder
fn clone(&self) -> BookBuilder
[src]
fn clone(&self) -> BookBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for BookBuilder
[src]
impl PartialEq for BookBuilder
fn eq(&self, other: &BookBuilder) -> bool
[src]
fn eq(&self, other: &BookBuilder) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &BookBuilder) -> bool
[src]
fn ne(&self, other: &BookBuilder) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for BookBuilder
impl Send for BookBuilder
impl Sync for BookBuilder
impl Sync for BookBuilder