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

pub struct BookBuilder { /* fields omitted */ }

A helper for setting up a new book and its directory structure.

Implementations

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

impl Debug for BookBuilder[src]

impl PartialEq<BookBuilder> for BookBuilder[src]

impl StructuralPartialEq for BookBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,