docs

bare::ffi::types

API 参考只有英文版,由标准库源代码中的英文文档注释生成。

C's integer and float types under their C names, as the target's C compiler sizes them. Each is an alias: on one target c_int and i32 are the same type. long is 32 bits on Windows and on 32-bit targets, wchar_t 16 bits on Windows.

Structs

c_voidSource

pub struct c_void

C's void, only behind a pointer: CPtr<c_void> is a void*.

Type aliases

c_scharSource

pub type c_schar = i8

C signed char.

c_ucharSource

pub type c_uchar = u8

C unsigned char.

c_shortSource

pub type c_short = i16

C short.

c_ushortSource

pub type c_ushort = u16

C unsigned short.

c_intSource

pub type c_int = i32

C int.

c_uintSource

pub type c_uint = u32

C unsigned int.

c_longSource

pub type c_long = i32

C long: 32 bits on Windows and 32-bit targets, else 64.

c_longSource

pub type c_long = i64

C long: 32 bits on Windows and 32-bit targets, else 64.

c_ulongSource

pub type c_ulong = u32

C unsigned long: 32 bits on Windows and 32-bit targets, else 64.

c_ulongSource

pub type c_ulong = u64

C unsigned long: 32 bits on Windows and 32-bit targets, else 64.

c_longlongSource

pub type c_longlong = i64

C long long.

c_ulonglongSource

pub type c_ulonglong = u64

C unsigned long long.

c_size_tSource

pub type c_size_t = usize

C size_t.

c_ssize_tSource

pub type c_ssize_t = isize

C ssize_t.

c_ptrdiff_tSource

pub type c_ptrdiff_t = isize

C ptrdiff_t.

c_intptr_tSource

pub type c_intptr_t = isize

C intptr_t.

c_uintptr_tSource

pub type c_uintptr_t = usize

C uintptr_t.

c_wcharSource

pub type c_wchar = u16

C wchar_t: a UTF-16 unit on Windows, unsigned on Linux on Arm.

c_wcharSource

pub type c_wchar = u32

c_wcharSource

pub type c_wchar = i32

C wchar_t: a UTF-16 unit on Windows, unsigned on Linux on Arm.

c_floatSource

pub type c_float = f32

C float.

c_doubleSource

pub type c_double = f64

C double.