File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,23 @@ impl Default for CodegenConfig {
155
155
/// // Write the generated bindings to an output file.
156
156
/// bindings.write_to_file("path/to/output.rs")?;
157
157
/// ```
158
+ ///
159
+ /// # Enums
160
+ ///
161
+ /// Bindgen can map C/C++ enums into Rust in different ways. The way bindgen maps enums depends on
162
+ /// the pattern passed to several methods:
163
+ ///
164
+ /// 1. [`bitfield_enum()`](#method.bitfield_enum)
165
+ /// 2. [`constified_enum_module()`](#method.constified_enum_module)
166
+ /// 3. [`rustified_enum()`](#method.rustified_enum)
167
+ ///
168
+ /// For each C enum, bindgen tries to match the pattern in the following order:
169
+ ///
170
+ /// 1. Bitfield enum
171
+ /// 2. Constified enum module
172
+ /// 3. Rustified enum
173
+ ///
174
+ /// If none of the above patterns match, then bindgen will generate a set of Rust constants.
158
175
#[ derive( Debug , Default ) ]
159
176
pub struct Builder {
160
177
options : BindgenOptions ,
You can’t perform that action at this time.
0 commit comments