Skip to main content

prepare_result

Function prepare_result 

Source
pub unsafe fn prepare_result(
    data: Value,
    result_buf: *mut *mut u8,
    result_len: *mut usize,
)
Expand description

Prepare a result for return to the framework

Internal helper function that handles the common memory management for both success and error results.

ยงSafety

The caller must ensure that:

  • result_buf points to valid, properly aligned memory for writing a pointer
  • result_len points to valid, properly aligned memory for writing a usize
  • These pointers remain valid for the duration of the call
  • The pointers are not aliased (no other mutable references exist)