Skip to main content

plugin_call_async

Function plugin_call_async 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn plugin_call_async( _handle: *mut c_void, _type_tag: *const c_char, _request: *const u8, _request_len: usize, _callback: extern "C" fn(context: *mut c_void, request_id: u64, data: *const u8, len: usize, error_code: u32), _context: *mut c_void, ) -> u64
Expand description

Initiate an asynchronous plugin call.

§Status

Not yet implemented. This function is reserved for future async API support. Currently returns 0 to indicate the operation is not available.

§Planned Behavior

When implemented, this function will:

  1. Accept a request and completion callback
  2. Submit the request for async processing
  3. Return a non-zero request ID for tracking/cancellation
  4. Invoke the callback with the response when complete

§Safety

When implemented, the following invariants must hold:

  • handle must be a valid handle from plugin_init, or null
  • type_tag must be a valid null-terminated C string, or null
  • request must be valid for request_len bytes, or null if request_len is 0
  • callback must remain valid until invoked or the request is cancelled
  • context is passed through to the callback unchanged

§Returns

Request ID that can be used with plugin_cancel_async, or 0 if not implemented.