Function libyml::loader::yaml_parser_load
source · pub unsafe fn yaml_parser_load(
parser: *mut YamlParserT,
document: *mut YamlDocumentT,
) -> Success
Expand description
Parse the input stream and produce the next YAML document.
Call this function subsequently to produce a sequence of documents constituting the input stream.
If the produced document has no root node, it means that the document end has been reached.
An application is responsible for freeing any data associated with the produced document object using the yaml_document_delete() function.
An application must not alternate the calls of yaml_parser_load() with the calls of yaml_parser_scan() or yaml_parser_parse(). Doing this will break the parser.
§Safety
parser
must be a valid, non-null pointer to a properly initializedYamlParserT
struct.document
must be a valid, non-null pointer to aYamlDocumentT
struct that can be safely written to.- The
YamlParserT
andYamlDocumentT
structs must be properly aligned and have the expected memory layout. - The caller must call
yaml_document_delete
to free any data associated with the produced document object. - The caller must not alternate calls to
yaml_parser_load
with calls toyaml_parser_scan
oryaml_parser_parse
on the sameYamlParserT
instance.