[−][src]Crate ffi_utils
FFI utilities.
Re-exports
pub use self::result::FfiResult; |
pub use self::result::NativeResult; |
pub use self::result::FFI_RESULT_OK; |
pub use self::string::StringError; |
Modules
bindgen_utils | Utilities for binding generators. |
callback | Helpers to work with extern "C" callbacks. |
result | Utilities for handling results and errors across the FFI boundary. |
string | Utilities for passing strings across FFI boundaries. |
test_utils | Test utilities. |
Macros
call_result_cb | Convert a result into an |
ffi_error | Convert an error into a pair of |
ffi_error_code | Convert an error into an |
ffi_result | Convert a result into a pair of |
ffi_result_code | Convert a result into an |
try_cb | Given a result, calls the callback if it is an error, otherwise produces the wrapped value.
Should be called within |
Structs
OpaqueCtx | Type that holds opaque user data handed into FFI functions. |
Traits
ErrorCode | Trait for types that can be converted to integer error code. |
ReprC | Trait to convert between FFI and Rust representations of types. |
SafePtr | Provides FFI-safe pointers, as opposed to raw |
Functions
base64_decode | Decode base64 encoded data. |
base64_encode | Encode the data using base64 encoding. |
catch_unwind_cb | Catch panics. On error call the callback. |
catch_unwind_result | Catches panics and returns the result. |
vec_clone_from_raw_parts⚠ | Converts a pointer and length to |
vec_from_raw_parts⚠ | Retakes ownership of a |
vec_into_raw_parts | Consumes a |