Function libyml::api::yaml_emitter_set_output

source ·
pub unsafe fn yaml_emitter_set_output(
    emitter: *mut YamlEmitterT,
    handler: YamlWriteHandlerT,
    data: *mut c_void,
)
Expand description

Set a generic output handler.

This function sets a custom output handler for the emitter.

§Safety

  • emitter must be a valid, non-null pointer to a properly initialized YamlEmitterT struct.
  • The YamlEmitterT struct must not have an output handler already set.
  • handler must be a valid function pointer that follows the signature of YamlWriteHandlerT.
  • data must be a valid pointer that will be passed to the handler function.
  • The YamlEmitterT struct and its associated data structures must be properly aligned and have the expected memory layout.