[][src]Struct mdbook::book::BookBuilder

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 PartialEq<BookBuilder> for BookBuilder
[src]

impl Clone for BookBuilder
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for BookBuilder
[src]

Auto Trait Implementations

impl Send for BookBuilder

impl Sync for BookBuilder

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]