Function libyml::api::yaml_parser_set_input_string

source ·
pub unsafe fn yaml_parser_set_input_string(
    parser: *mut YamlParserT,
    input: *const u8,
    size: u64,
)
Expand description

Set a string input.

This function sets the input source for the parser to a string buffer. Note that the input pointer must be valid while the parser object exists. The application is responsible for destroying input after destroying the parser.

§Safety

  • parser must be a valid, non-null pointer to a properly initialized YamlParserT struct.
  • The YamlParserT struct must not have an input handler already set.
  • input must be a valid, non-null pointer to a null-terminated string buffer.
  • The input string buffer must remain valid and unmodified until the parser object is destroyed.
  • The YamlParserT struct and its associated data structures must be properly aligned and have the expected memory layout.