[−][src]Struct mdbook::book::BookBuilder
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]
fn eq(&self, other: &BookBuilder) -> bool
[src]
fn ne(&self, other: &BookBuilder) -> bool
[src]
impl Clone for BookBuilder
[src]
fn clone(&self) -> 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 Unpin for BookBuilder
impl Sync for BookBuilder
impl Send for BookBuilder
impl RefUnwindSafe for BookBuilder
impl UnwindSafe for BookBuilder
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,