Skip to main content

parse_content

Function parse_content 

Source
pub fn parse_content(
    path: &Path,
    content: &str,
    component_defs: &ComponentDefs,
) -> Result<ParseResult, Vec<ParseError>>
Expand description

Parse a spec document from an in-memory string into a ParseResult.

This returns only fully valid documents. Call parse_content_recovering when the caller needs best-effort access to partially valid component trees.

ยงErrors

Returns Vec<ParseError> when front matter, XML parsing, or validation prevents the document from being considered fully valid.