[−][src]Struct mdbook::book::Chapter
The representation of a "chapter", usually mapping to a single file on disk however it may contain multiple sub-chapters.
Fields
name: String
The chapter's name.
content: String
The chapter's contents.
number: Option<SectionNumber>
The chapter's section number, if it has one.
sub_items: Vec<BookItem>
Nested items.
path: PathBuf
The chapter's location, relative to the SUMMARY.md
file.
parent_names: Vec<String>
An ordered list of the names of each chapter above this one, in the hierarchy.
Methods
impl Chapter
[src]
pub fn new<P: Into<PathBuf>>(
name: &str,
content: String,
path: P,
parent_names: Vec<String>
) -> Chapter
[src]
name: &str,
content: String,
path: P,
parent_names: Vec<String>
) -> Chapter
Create a new chapter with the provided content.
Trait Implementations
impl From<Chapter> for BookItem
[src]
impl Clone for Chapter
[src]
impl Default for Chapter
[src]
impl PartialEq<Chapter> for Chapter
[src]
impl Display for Chapter
[src]
impl Debug for Chapter
[src]
impl StructuralPartialEq for Chapter
[src]
impl Serialize for Chapter
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Chapter
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Chapter
impl Sync for Chapter
impl Unpin for Chapter
impl UnwindSafe for Chapter
impl RefUnwindSafe for Chapter
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,