Function pact_matching_ffi::models::message_pact::message_pact_find_metadata [−][src]
#[no_mangle] pub extern "C" fn message_pact_find_metadata(
message_pact: *const MessagePact,
key1: *const c_char,
key2: *const c_char
) -> *const c_char
Expand description
Get a copy of the metadata value indexed by key1
and key2
.
Safety
Since it is a copy, the returned string may safely outlive
the Message
.
The returned string must be deleted with string_delete
.
The returned pointer will be NULL if the metadata does not contain the given key, or if an error occurred.
Error Handling
On failure, this function will return a NULL pointer.
This function may fail if the provided key1
or key2
strings contains
invalid UTF-8, or if the Rust string contains embedded null (‘\0’)
bytes.