[−][src]Struct markdown_extract::document::Section
A section within a markdown document
Fields
level: u8
Section depth. In markdown, legal values range from 1 to 6, although this implementation technically allows more.
title: String
Title of section
body: String
Raw markdown body.
Does not include any child sections. See the children
property for child content.
parent: Option<usize>
An optional pointer to a parent section.
This property should always be Some
, unless the section is located at the root of the
document.
children: Vec<usize>
A vector of child sections
Methods
impl Section
[src]
pub fn new() -> Section
[src]
Construct a new section
pub fn append_to_body(&mut self, line: String)
[src]
Appends the given line to the section's body
pub fn add_child(&mut self, child: usize)
[src]
Add a child to this section.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnwindSafe for Section
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,