Function libyml::api::yaml_emitter_set_encoding

source ·
pub unsafe fn yaml_emitter_set_encoding(
    emitter: *mut YamlEmitterT,
    encoding: YamlEncodingT,
)
Expand description

Set the output encoding.

This function sets the encoding to be used for the output by the emitter.

§Safety

  • emitter must be a valid, non-null pointer to a properly initialized YamlEmitterT struct.
  • The YamlEmitterT struct must not have an encoding already set, or the encoding must be YamlAnyEncoding.
  • The YamlEmitterT struct and its associated data structures must be properly aligned and have the expected memory layout.