#[no_mangle]
pub extern "C" fn pactffi_with_matching_rules(
    interaction: InteractionHandle,
    part: InteractionPart,
    rules: *const c_char
) -> bool
Expand description

Add matching rules to the interaction.

  • interaction - Interaction handle to set the matching rules for.
  • part - Request or response part (if applicable).
  • rules - JSON string of the matching rules to add to the interaction.

This function can be called multiple times, in which case the matching rules will be merged. The function will return true if the rules were successfully added, and false if an error occurred.

For synchronous messages which allow multiple responses, the matching rules will be added to all the responses.

§Safety

The rules parameter must be a valid pointer to a NULL terminated UTF-8 string.