pub struct MdDocument<'input> { /* private fields */ }Expand description
A parsed version of a Markdown source.
The struct is opaque and encapsulates the result of parsing at the Markdown
level. See the contents of [crate::spec] for extracting sections from an
MdDocument instance.
Implementations§
Source§impl<'input> MdDocument<'input>
impl<'input> MdDocument<'input>
Sourcepub fn from_string(source: &'input str) -> Self
pub fn from_string(source: &'input str) -> Self
Create an MdDocument from a source string.
Source§impl<'input> MdDocument<'input>
impl<'input> MdDocument<'input>
Sourcepub fn write_to_string(self) -> Result<String, Error>
pub fn write_to_string(self) -> Result<String, Error>
Consume an MdDocument and write it back into a String.
Sourcepub fn write_to_path<P>(self, path: P) -> Result<(), Error>
pub fn write_to_path<P>(self, path: P) -> Result<(), Error>
Consume an MdDocument and write it back into the given path.
Auto Trait Implementations§
impl<'input> Freeze for MdDocument<'input>
impl<'input> RefUnwindSafe for MdDocument<'input>
impl<'input> Send for MdDocument<'input>
impl<'input> Sync for MdDocument<'input>
impl<'input> Unpin for MdDocument<'input>
impl<'input> UnwindSafe for MdDocument<'input>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more