[−][src]Module libffi::middle
Middle layer providing a somewhat safer (but still quite unsafe) API.
The main idea of the middle layer is to wrap types
ffi_cif
and
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. |
ClosureOnce | A closure that owns needs-drop data. |
Type | Represents a single C type. |
Constants
ffi_abi_FFI_DEFAULT_ABI |
Functions
arg | Coerces an argument reference into the |
Type Definitions
CallbackOnce | The type of callback invoked by a
|
FfiAbi |