Skip to main content

parse_collecting

Function parse_collecting 

Source
pub fn parse_collecting(
    content: &str,
) -> Result<(Frontmatter, Vec<FrontmatterError>), FrontmatterError>
Expand description

Parses the block, accumulating field-level problems rather than stopping at the first one.

The returned Err is reserved for failures that make further validation meaningless — no block at all, an unterminated block, YAML that does not parse, or a block that is not a mapping. Past that point every field is read independently, so a bad value for one key says nothing about the others and each problem is collected into the returned list. A field that fails takes its default value in the returned Frontmatter, which callers must therefore only trust when the list is empty.