Struct mdbook::book::Book [] [src]

pub struct Book { /* fields omitted */ }

A dumb tree structure representing a book.

For the moment a book is just a collection of BookItems which are accessible by either iterating (immutably) over the book with iter(), or recursively applying a closure to each section to mutate the chapters, using for_each_mut().

Methods

impl Book
[src]

[src]

Create an empty book.

[src]

Get a depth-first iterator over the items in the book.

[src]

Recursively apply a closure to each item in the book, allowing you to mutate them.

Note

Unlike the iter() method, this requires a closure instead of returning an iterator. This is because using iterators can possibly allow you to have iterator invalidation errors.

[src]

Append a BookItem to the Book.

Trait Implementations

impl Debug for Book
[src]

[src]

Formats the value using the given formatter.

impl Clone for Book
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for Book
[src]

[src]

Returns the "default value" for a type. Read more

impl PartialEq for Book
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.