Function pact_mock_server_ffi::mock_server_mismatches [−][src]
#[no_mangle] pub extern "C" fn mock_server_mismatches(
mock_server_port: i32
) -> *mut c_char
Expand description
External interface to get all the mismatches from a mock server. The port number of the mock server is passed in, and a pointer to a C string with the mismatches in JSON format is returned.
NOTE: The JSON string for the result is allocated on the heap, and will have to be freed
once the code using the mock server is complete. The cleanup_mock_server
function is
provided for this purpose.
Errors
If there is no mock server with the provided port number, or the function panics, a NULL pointer will be returned. Don’t try to dereference it, it will not end well for you.