Function libyml::api::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 initializedYamlParserT
struct.- The
YamlParserT
struct must not have an encoding already set, or the encoding must beYamlAnyEncoding
. - The
YamlParserT
struct and its associated data structures must be properly aligned and have the expected memory layout.