#[no_mangle]
pub extern "C" fn pactffi_parse_matcher_definition(
    expression: *const c_char
) -> *const MatchingRuleDefinitionResult
Expand description

Parse a matcher definition string into a MatchingRuleDefinition containing the example value, and matching rules and any generator.

The following are examples of matching rule definitions:

  • matching(type,'Name') - type matcher with string value ‘Name’
  • matching(number,100) - number matcher
  • matching(datetime, 'yyyy-MM-dd','2000-01-01') - datetime matcher with format string

See Matching Rule definition expressions.

The returned value needs to be freed up with the pactffi_matcher_definition_delete function.

§Errors

If the expression is invalid, the MatchingRuleDefinition error will be set. You can check for this value with the pactffi_matcher_definition_error function.

§Safety

This function is safe if the expression is a valid NULL terminated string pointer.