Function libyml::loader::yaml_parser_set_composer_error
source · pub unsafe fn yaml_parser_set_composer_error(
parser: *mut YamlParserT,
problem: *const i8,
problem_mark: YamlMarkT,
) -> Success
Expand description
Sets the error type to YamlComposerError
and stores the problem and its mark.
§Parameters
parser
: A mutable pointer to theYamlParserT
struct.problem
: A pointer to a constant C string representing the problem.problem_mark
: AYamlMarkT
struct representing the mark where the problem occurred.
§Return
Returns FAIL
to indicate an error.
§Safety
parser
must be a valid, non-null pointer to a properly initializedYamlParserT
struct.problem
must be a valid, non-null pointer to a constant C string.problem_mark
must be a validYamlMarkT
struct.- The
YamlParserT
struct must be properly aligned and have the expected memory layout. - The
problem
string must be null-terminated. - The
problem_mark
struct must be properly initialized. - The caller must handle the error and clean up any resources.