Function libyml::api::yaml_mapping_start_event_initialize
source · pub unsafe fn yaml_mapping_start_event_initialize(
event: *mut YamlEventT,
anchor: *const u8,
tag: *const u8,
implicit: bool,
style: YamlMappingStyleT,
) -> Success
Expand description
Create a MAPPING-START event.
This function initializes a YamlEventT
struct with the type YamlMappingStartEvent
.
It is used to signal the start of a mapping (key-value pairs) in the YAML document being emitted.
The style
argument may be ignored by the emitter.
Either the tag
attribute or the implicit
flag must be set.
§Safety
event
must be a valid, non-null pointer to aYamlEventT
struct that can be safely written to.anchor
, if not null, must be a valid pointer to a null-terminated UTF-8 string.tag
, if not null, must be a valid pointer to a null-terminated UTF-8 string.- The
YamlEventT
struct must be properly aligned and have the expected memory layout. - The caller is responsible for freeing any dynamically allocated memory associated with the event using
yaml_event_delete
.