Skip to main content

serialize

Function serialize 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn serialize( ptr: *const u8, len: usize, ) -> *mut u8
Expand description

Deserialise a HookResponse JSON and re-serialise it in the format expected by the caller detected during the most recent parse call.

§Safety

ptr must point to len consecutive readable bytes valid for the duration of this call. The returned pointer must be freed with dealloc(ptr, 4 + payload_len) where payload_len is the LE-i32 at the first four bytes of the returned buffer.