Skip to main content

ket_process_gates_json

Function ket_process_gates_json 

Source
#[unsafe(no_mangle)]
pub extern "C" fn ket_process_gates_json( process: &Process, block: &mut *mut c_char, ) -> i32
Expand description

Returns the accumulated gate instructions of the process as a JSON string.

The returned string is a JSON array of gate instruction objects representing the gates in the process’s main block. The string is heap-allocated and the caller must free it with super::ket_string_delete.

§Parameters

  • process: The process whose gate list is serialized.
  • block: Output: set to a pointer to a heap-allocated null-terminated JSON string.

§Returns

0 on success, non-zero error code on failure.