Function pact_matching_ffi::models::message::message_find_metadata [−][src]
#[no_mangle] pub extern "C" fn message_find_metadata(
message: *const Message,
key: *const c_char
) -> *const c_char
Expand description
Get a copy of the metadata value indexed by key
.
Safety
The returned string must be deleted with string_delete
.
Since it is a copy, the returned string may safely outlive
the Message
.
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 key
string contains
invalid UTF-8, or if the Rust string contains embedded null (‘\0’)
bytes.