pub struct FrontmatterParser { /* private fields */ }Expand description
Parser for document frontmatter.
Implementations§
Source§impl FrontmatterParser
impl FrontmatterParser
Sourcepub fn parse<'a, T: DeserializeOwned>(
&self,
content: &'a str,
) -> Result<(Option<T>, &'a str)>
pub fn parse<'a, T: DeserializeOwned>( &self, content: &'a str, ) -> Result<(Option<T>, &'a str)>
Sourcepub fn extract_raw<'a>(
&self,
content: &'a str,
) -> Option<(&'a str, FrontmatterFormat)>
pub fn extract_raw<'a>( &self, content: &'a str, ) -> Option<(&'a str, FrontmatterFormat)>
Extract raw frontmatter string without parsing.
Useful for validation before full parsing.
Trait Implementations§
Source§impl Clone for FrontmatterParser
impl Clone for FrontmatterParser
Source§fn clone(&self) -> FrontmatterParser
fn clone(&self) -> FrontmatterParser
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 FrontmatterParser
impl Debug for FrontmatterParser
Source§impl Default for FrontmatterParser
impl Default for FrontmatterParser
Source§fn default() -> FrontmatterParser
fn default() -> FrontmatterParser
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FrontmatterParser
impl RefUnwindSafe for FrontmatterParser
impl Send for FrontmatterParser
impl Sync for FrontmatterParser
impl Unpin for FrontmatterParser
impl UnsafeUnpin for FrontmatterParser
impl UnwindSafe for FrontmatterParser
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