Skip to main content

parse

Function parse 

Source
pub fn parse<'a, T>(path: &Path, text: &'a str) -> Result<(T, &'a str)>
Expand description

Parse a frontmatter document from text. Returns the deserialized frontmatter and the remaining body as a slice into the input.

Errors are reported as Error::InvalidFormat / Error::YamlParse with path attached so callers can surface filename context.