pub struct ParsedDocument {
pub frontmatter: HashMap<String, Value>,
pub body: String,
pub frontmatter_range: Option<(usize, usize)>,
}Expand description
A parsed markdown document with frontmatter separated from body.
Fields§
§frontmatter: HashMap<String, Value>Parsed frontmatter key-value pairs.
body: StringThe markdown body (everything after the closing ---).
frontmatter_range: Option<(usize, usize)>Byte offsets of the frontmatter block: (start_of_opening_delimiter, end_of_closing_delimiter).
None if no frontmatter was found.
Trait Implementations§
Source§impl Clone for ParsedDocument
impl Clone for ParsedDocument
Source§fn clone(&self) -> ParsedDocument
fn clone(&self) -> ParsedDocument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParsedDocument
impl Debug for ParsedDocument
Source§impl<'de> Deserialize<'de> for ParsedDocument
impl<'de> Deserialize<'de> for ParsedDocument
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ParsedDocument
impl RefUnwindSafe for ParsedDocument
impl Send for ParsedDocument
impl Sync for ParsedDocument
impl Unpin for ParsedDocument
impl UnsafeUnpin for ParsedDocument
impl UnwindSafe for ParsedDocument
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