#[no_mangle]
pub extern "C" fn pactffi_sync_message_set_request_contents_str(
message: *mut SynchronousMessage,
contents: *const c_char,
content_type: *const c_char
)
Expand description
Sets the request contents of the message.
message
- the message to set the request contents forcontents
- pointer to contents to copy from. Must be a valid NULL-terminated UTF-8 string pointer.content_type
- pointer to the NULL-terminated UTF-8 string containing the content type of the data.
§Safety
The message contents and content type must either be NULL pointers, or point to valid UTF-8 encoded NULL-terminated strings. Otherwise behaviour is undefined.
§Error Handling
If the contents is a NULL pointer, it will set the message contents as null. If the content type is a null pointer, or can’t be parsed, it will set the content type as unknown.