Module wedpr_ffi_common::utils [−][src]
Common utility functions for FFI.
Structs
CODER |
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_string | Converts C char pointer to Rust string. |
java_jbytes_to_bytes | Converts Java bytes 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. |