pub struct ParsedDocument { /* private fields */ }Expand description
A parsed markdown document with frontmatter
Implementations§
Source§impl ParsedDocument
impl ParsedDocument
Sourcepub fn new(fields: HashMap<String, QuillValue>) -> Self
pub fn new(fields: HashMap<String, QuillValue>) -> Self
Create a new ParsedDocument with the given fields
Sourcepub fn with_quill_tag(
fields: HashMap<String, QuillValue>,
quill_tag: Option<String>,
) -> Self
pub fn with_quill_tag( fields: HashMap<String, QuillValue>, quill_tag: Option<String>, ) -> Self
Create a ParsedDocument from fields and optional quill tag
Sourcepub fn from_markdown(markdown: &str) -> Result<Self, ParseError>
pub fn from_markdown(markdown: &str) -> Result<Self, ParseError>
Create a ParsedDocument from markdown string
Sourcepub fn get_field(&self, name: &str) -> Option<&QuillValue>
pub fn get_field(&self, name: &str) -> Option<&QuillValue>
Get a specific field
Sourcepub fn fields(&self) -> &HashMap<String, QuillValue>
pub fn fields(&self) -> &HashMap<String, QuillValue>
Get all fields (including body)
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParsedDocument
impl RefUnwindSafe for ParsedDocument
impl Send for ParsedDocument
impl Sync for ParsedDocument
impl Unpin 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