Module wedpr_ffi_common::utils [−][src]
Common utility functions for FFI.
Structs
CInputBuffer | |
CODER | |
COutputBuffer |
Constants
FAILURE | Default failure status return code for C/C++ functions. |
SUCCESS | Default success status return code for C/C++ functions. |
Functions
bytes_to_string | Converts bytes to an encoded string. |
c_char_pointer_to_bytes | Converts C char pointer to Rust bytes. |
c_char_pointer_to_string | Converts C char pointer to Rust string. |
c_read_raw_pointer⚠ | Reads C raw pointer to Rust bytes. |
c_write_raw_pointer⚠ | Writes C raw pointer from Rust bytes. |
java_bytes_to_jbyte_array | Converts Rust bytes to Java byte array. |
java_jbytes_to_bytes | Converts Java byte array to Rust bytes. |
java_jstring_to_bytes | Converts Java String to Rust bytes. |
java_jstring_to_string | Converts Java String to Rust String. |
java_new_jobject | Creates a new Java object of a given class specified by java_class_name. Please note that objects::JObject is the wrapper object type used by FFI logic. You will need to later call .into_inner() function to extract the actual object type (sys::jobject), and return it to Java runtime. |
java_set_error_field_and_extract_jobject | Sets the default error message field and extracts actual java object to return in a erroneous condition. |
string_to_bytes | Converts an encoded string to a bytes vector. |