libyml::api

Function yaml_parser_set_encoding

Source
pub unsafe fn yaml_parser_set_encoding(
    parser: *mut YamlParserT,
    encoding: YamlEncodingT,
)
Expand description

Set the source encoding.

This function sets the expected encoding of the input source for the parser.

ยงSafety

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