Module ffi
Platform-specific types, as defined by C.
Code that interacts via FFI will almost certainly be using the base types provided by C, which aren't nearly as nicely defined as Rust's primitive types. This module provides types which will match those defined by C, so that code that interacts with C will refer to the correct types.
Modules
Structs
- CStr A dynamically-sized view of a C string.
- FromBytesUntilNulError An error indicating that no nul byte was present.
-
VaList
A variable argument list, ABI-compatible with
va_listin C.
Enums
- FromBytesWithNulError An error indicating that a nul byte was not in the expected position.
-
c_void
Equivalent to C's
voidtype when used as a [pointer].
Traits
-
VaArgSafe
Types that are valid to read using
VaList::arg.
Type Aliases
-
c_char
Equivalent to C's
chartype. -
c_double
Equivalent to C's
doubletype. -
c_float
Equivalent to C's
floattype. -
c_int
Equivalent to C's
signed int(int) type. -
c_long
Equivalent to C's
signed long(long) type. -
c_longlong
Equivalent to C's
signed long long(long long) type. -
c_ptrdiff_t
Equivalent to C's
ptrdiff_ttype, fromstddef.h(orcstddeffor C++). -
c_schar
Equivalent to C's
signed chartype. -
c_short
Equivalent to C's
signed short(short) type. -
c_size_t
Equivalent to C's
size_ttype, fromstddef.h(orcstddeffor C++). -
c_ssize_t
Equivalent to C's
ssize_t(on POSIX) orSSIZE_T(on Windows) type. -
c_uchar
Equivalent to C's
unsigned chartype. -
c_uint
Equivalent to C's
unsigned inttype. -
c_ulong
Equivalent to C's
unsigned longtype. -
c_ulonglong
Equivalent to C's
unsigned long longtype. -
c_ushort
Equivalent to C's
unsigned shorttype.