Skip to main content

parse_document

Function parse_document 

Source
pub fn parse_document(input: &str) -> Result<Document, ParseError>
Expand description

Parse a YAML document into a Document.

Only the first document in the stream is returned. Anchors and aliases are preserved as distinct nodes rather than being expanded, and the %YAML and %TAG directives are recorded so the document can be re-emitted with them intact.