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
- Contains an untyped pointer to a function argument.
- Provides a builder-style API for constructing CIFs and closures.
- Describes the calling convention and types for calling a function.
- Represents a closure callable from C.
- A closure that owns needs-drop data.
- Represents a single C type.
Constants
Functions
- Coerces an argument reference into the
Arg
type.
Type Definitions
- The type of callback invoked by a
ClosureOnce
.