Function libyml::yaml_emitter_dump

source ·
pub unsafe fn yaml_emitter_dump(
    emitter: *mut YamlEmitterT,
    document: *mut YamlDocumentT,
) -> Success
Expand description

Emit a YAML document.

The document object may be generated using the yaml_parser_load() function or the yaml_document_initialize() function. The emitter takes the responsibility for the document object and destroys its content after it is emitted. The document object is destroyed even if the function fails.

§Safety

  • emitter must be a valid, non-null pointer to a properly initialized YamlEmitterT struct.
  • document must be a valid, non-null pointer to a YamlDocumentT struct that can be safely read from and will be destroyed by the function.
  • The YamlEmitterT and YamlDocumentT structs must be properly aligned and have the expected memory layout.
  • The YamlEmitterT struct must be in a valid state to emit the provided document.