Module pact_ffi::models::expressions

source ·
Expand description

Functions for dealing with matching rule expressions

Structs§

Enums§

Functions§

  • Frees the memory used by the result of parsing the matching definition expression
  • Returns any error message from parsing a matching definition expression. If there is no error, it will return a NULL pointer, otherwise returns the error message as a NULL-terminated string. The returned string must be freed using the pactffi_string_delete function once done with it.
  • Returns the generator from parsing a matching definition expression. If there was an error or there is no associated generator, it will return a NULL pointer, otherwise returns the generator as a pointer.
  • Returns an iterator over the matching rules from the parsed definition. The iterator needs to be deleted with the pactffi_matching_rule_iter_delete function once done with it.
  • Returns the value from parsing a matching definition expression. If there was an error, it will return a NULL pointer, otherwise returns the value as a NULL-terminated string. The returned string must be freed using the pactffi_string_delete function once done with it.
  • Returns the type of the value from parsing a matching definition expression. If there was an error parsing the expression, it will return Unknown.
  • Return the ID of the matching rule.
  • Free the iterator when you’re done using it.
  • Get the next matching rule or reference from the iterator. As the values returned are owned by the iterator, they do not need to be deleted but will be cleaned up when the iterator is deleted.
  • Returns the matching rule pointer for the matching rule. Will return a NULL pointer if the matching rule result was a reference.
  • Return any matching rule reference to a attribute by name. This is when the matcher should be configured to match the type of a structure. I.e.,
  • Returns the associated value for the matching rule. If the matching rule does not have an associated value, will return a NULL pointer.
  • Parse a matcher definition string into a MatchingRuleDefinition containing the example value, and matching rules and any generator.
  • Validates the date/time value against the date/time format string. If the value is valid, this function will return a zero status code (EXIT_SUCCESS). If the value is not valid, will return a value of 1 (EXIT_FAILURE) and set the error message which can be retrieved with pactffi_get_error_message.