#[no_mangle]
pub extern "C" fn pactffi_pact_interaction_as_message(
    interaction: *const PactInteraction
) -> *const Message
Expand description

Casts this interaction to a Message interaction. Returns a NULL pointer if the interaction can not be casted to a Message interaction (for instance, it is a http interaction). The returned pointer must be freed with pactffi_message_delete when no longer required.

Note that if the interaction is a V4 AsynchronousMessage, it will be converted to a V3 Message before being returned.

§Safety

This function is safe as long as the interaction pointer is a valid pointer.

§Errors

On any error, this function will return a NULL pointer.