Expand description
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.
Re-exports§
pub use self::primitives::c_char;
pub use self::primitives::c_double;
pub use self::primitives::c_float;
pub use self::primitives::c_int;
pub use self::primitives::c_long;
pub use self::primitives::c_longlong;
pub use self::primitives::c_schar;
pub use self::primitives::c_short;
pub use self::primitives::c_uchar;
pub use self::primitives::c_uint;
pub use self::primitives::c_ulong;
pub use self::primitives::c_ulonglong;
pub use self::primitives::c_ushort;
pub use self::va_list::VaList;
Experimental pub use self::va_list::VaListImpl;
Experimental pub use self::primitives::c_ptrdiff_t;
Experimental pub use self::primitives::c_size_t;
Experimental pub use self::primitives::c_ssize_t;
Experimental
Modules§
- c_str
CStr
and its related types.- primitives 🔒
- Defines primitive types that match C’s type definitions for FFI compatibility.
- va_list
Experimental - C’s “variable arguments”
Structs§
- CStr
- Representation of a borrowed C string.
- From
Bytes Until NulError - An error indicating that no nul byte was present.
Enums§
- From
Bytes With NulError - An error indicating that a nul byte was not in the expected position.
- c_void
- Equivalent to C’s
void
type when used as a pointer.