[go: up one dir, main page]

Module libffi::low

source ·
Expand description

A low-level wrapping of libffi, this layer makes no attempts at safety, but tries to provide a somewhat more idiomatic interface.

This module also re-exports types and constants necessary for using the library, so it should not be generally necessary to use the raw module. While this is a bit “Rustier” than raw, I’ve avoided drastic renaming in favor of hewing close to the libffi API. See middle for an easier-to-use approach.

Modules

Type tags used in constructing and inspecting ffi_types.
Re-exports the ffi_type objects used to describe the types of arguments and results.

Structs

Wraps a function pointer of unknown type.

Enums

The two kinds of errors reported by libffi.

Constants

Functions

call
Calls a C function as specified by a CIF.
Allocates a closure.
Frees a closure.
Initalizes a CIF (Call Interface) with the given ABI and types.
Initalizes a CIF (Call Interface) for a varargs function.
Initializes a closure with a callback function and userdata.
Initializes a mutable closure with a callback function and (mutable) userdata.

Type Definitions

The type of function called by a closure.
The type of function called by a mutable closure.
The callback type expected by raw::ffi_prep_closure_loc.
The std::result::Result type specialized for libffi Errors.