Struct mdbook::book::Chapter [] [src]

pub struct Chapter {
    pub name: String,
    pub content: String,
    pub number: Option<SectionNumber>,
    pub sub_items: Vec<BookItem>,
    pub path: PathBuf,
    pub parent_names: Vec<String>,
}

The representation of a "chapter", usually mapping to a single file on disk however it may contain multiple sub-chapters.

Fields

The chapter's name.

The chapter's contents.

The chapter's section number, if it has one.

Nested items.

The chapter's location, relative to the SUMMARY.md file.

An ordered list of the names of each chapter above this one, in the hierarchy.

Methods

impl Chapter
[src]

[src]

Create a new chapter with the provided content.

Trait Implementations

impl From<Chapter> for BookItem
[src]

[src]

Performs the conversion.

impl Debug for Chapter
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Chapter
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for Chapter
[src]

[src]

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

impl PartialEq for Chapter
[src]

[src]

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

[src]

This method tests for !=.

impl Display for Chapter
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Chapter

impl Sync for Chapter