You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define C-ABI type information and provide conversion and casting
8
+
9
+
-[**Struct ` CArrInfo`:**](./src/c/struct_info.rs) Represents C Array type
10
+
-[**Struct ` CPtrInfo`:**](./src/c/ptr_info.rs) Represents C Pointer type
11
+
-[**Struct ` CFnInfo`:**](./src/c/fn_info.rs) Represents C Function signature
12
+
provide CallableData and ClosureData creation
13
+
-[**Struct ` CStructInfo`:**](./src/c/struct_info.rs) Represents C Struct type
14
+
-[**Struct ` CTypeInfo<T>`:**](./src/c/type_info.rs) Represents C type, extended in `/c/types`
15
+
16
+
#### /c/types
17
+
18
+
Export fixed-size source time known types and non-fixed compile time known types
19
+
Implememt type-casting for all CTypes
20
+
21
+
**Mod `ctype_helper`:**
22
+
23
+
-**Function `get_conv`:**
24
+
get _FfiConvert_ from some ctype userdata, used for struct and array conversion
25
+
-**Function `get_size`:**
26
+
get size from some ctype userdata, used for call return and arguments boundary checking
27
+
-**Function `get_name`:**
28
+
get type name from some ctype userdata, used for pretty-print
29
+
-**Function `get_middle_type`:**
30
+
get **`libffi::middle::Type`:** from some ctype userdata
31
+
-**Function `is_ctype`:** check userdata is ctype
32
+
33
+
---
34
+
35
+
### /data
36
+
37
+
**Structs:** Provide memory userdata
38
+
39
+
-[**Struct `BoxData`:**](./src/data/box_data/mod.rs) A heap allocated memory with user definable lifetime
40
+
-[**Struct `LibData`:**](./src/data/lib_data.rs) A dynamic opened library
41
+
-[**Struct `RefData`:**](./src/data/ref_data/mod.rs) A reference that can be used for receiving return data from external function or pass pointer arguments
42
+
43
+
**Structs:** Provide function(pointer) userdata
44
+
45
+
-[**Struct `CallableData`:**](./src/data/callable_data.rs) A callable function, which can be created from function pointer
46
+
-[**Struct `ClosureData`:**](./src/data/closure_data.rs) A closure pointer, which can be created from lua function and can be used for callback
47
+
48
+
---
49
+
50
+
### /ffi
51
+
52
+
**Traits:** Provide ABI shared common type information trait
53
+
54
+
-**Trait `FfiSize`**
55
+
-**Trait `FfiSignedness`**
56
+
-**Trait `FfiConvert`:** Provide read LuaValue from FfiData or write LuaValue into FfiData
57
+
58
+
**Trait `FfiData`:** Provide common data handle, including methods below
59
+
60
+
-**Method `check_boundary`:** check boundary with offset and size
61
+
-**Method `get_pointer`:** returns raw pointer `*mut ()`
0 commit comments