Expand description
Middle layer providing a somewhat safer (but still quite unsafe) API.
The main idea of the middle layer is to wrap types low::ffi_cif
and low::ffi_closure as Cif and Closure, respectively,
so that their resources are managed properly. However, calling a
function via a CIF or closure is still unsafe because argument types
aren’t checked. See the high layer for closures
with type-checked arguments.
Re-exports§
pub use crate::low::Callback;pub use crate::low::CallbackMut;pub use crate::low::CodePtr;
Structs§
- Arg
- Contains an untyped pointer to a function argument.
- Builder
- Provides a builder-style API for constructing CIFs and closures.
- Cif
- Describes the calling convention and types for calling a function.
- Closure
- Represents a closure callable from C.
- Closure
Once - A closure that owns needs-drop data.
- Type
- Represents a single C type.
Constants§
Functions§
Type Aliases§
- Callback
Once - The type of callback invoked by a
ClosureOnce. - FfiAbi
- The type used to convey the ABI of a function.