Function libyml::yaml_emitter_emit
source · pub unsafe fn yaml_emitter_emit(
emitter: *mut YamlEmitterT,
event: *mut YamlEventT,
) -> Success
Expand description
Emit an event.
The event object may be generated using the yaml_parser_parse() function. The emitter takes the responsibility for the event object and destroys its content after it is emitted. The event object is destroyed even if the function fails.
§Safety
emitter
must be a valid, non-null pointer to a properly initializedYamlEmitterT
struct.event
must be a valid, non-null pointer to aYamlEventT
struct that can be safely read from and will be destroyed by the function.- The
YamlEmitterT
andYamlEventT
structs must be properly aligned and have the expected memory layout. - The
YamlEmitterT
struct must be in a valid state to emit the provided event.