Skip to main content

trait_call

Function trait_call 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn trait_call( json_ptr: *const u8, json_len: usize, out_len: *mut usize, ) -> *mut u8
Expand description

C ABI entry point: receives JSON args, calls trait function, returns JSON result.

ยงSafety

  • json_ptr must point to json_len valid bytes of JSON
  • out_len must be a valid pointer to write the result length
  • Caller must free the returned buffer via trait_free