Function libyml::api::yaml_scalar_event_initialize

source ·
pub unsafe fn yaml_scalar_event_initialize(
    event: *mut YamlEventT,
    data: ScalarEventData<'_>,
) -> Success
Expand description

Create a SCALAR event.

The style argument may be ignored by the emitter.

Either the tag attribute or one of the plain_implicit and quoted_implicit flags must be set.

§Safety

  • event must be a valid, non-null pointer to a YamlEventT struct that can be safely written to.
  • value must be a valid, non-null pointer to a null-terminated UTF-8 string.
  • 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.