Function libyml::document::yaml_document_add_sequence
source · pub unsafe fn yaml_document_add_sequence(
document: *mut YamlDocumentT,
tag: *const u8,
style: YamlSequenceStyleT,
) -> i32
Expand description
Create a SEQUENCE node and attach it to the document.
This function creates a new SEQUENCE node with the provided tag
and style
, and adds it to
the document’s node stack.
The style
argument may be ignored by the emitter.
Returns the node id or 0 on error.
§Safety
document
must be a valid, non-null pointer to aYamlDocumentT
struct.tag
, if not null, must be a valid pointer to a null-terminated UTF-8 string.- The
YamlDocumentT
struct and its associated nodes must be properly initialized and their memory allocated correctly. - The
YamlDocumentT
struct and its associated nodes must be properly aligned and have the expected memory layout. - The caller is responsible for freeing the memory allocated for the document using
yaml_document_delete
.