Struct bindgen::BindgenOptions [] [src]

pub struct BindgenOptions {
    pub hidden_types: RegexSet,
    pub opaque_types: RegexSet,
    pub whitelisted_types: RegexSet,
    pub whitelisted_functions: RegexSet,
    pub whitelisted_vars: RegexSet,
    pub bitfield_enums: RegexSet,
    pub constified_enums: RegexSet,
    pub builtins: bool,
    pub links: Vec<(String, LinkType)>,
    pub emit_ast: bool,
    pub emit_ir: bool,
    pub emit_ir_graphviz: Option<String>,
    pub enable_cxx_namespaces: bool,
    pub disable_name_namespacing: bool,
    pub layout_tests: bool,
    pub derive_debug: bool,
    pub derive_default: bool,
    pub unstable_rust: bool,
    pub use_core: bool,
    pub ctypes_prefix: Option<String>,
    pub namespaced_constants: bool,
    pub msvc_mangling: bool,
    pub convert_floats: bool,
    pub raw_lines: Vec<String>,
    pub clang_args: Vec<String>,
    pub input_header: Option<String>,
    pub input_unsaved_files: Vec<UnsavedFile>,
    pub dummy_uses: Option<String>,
    pub parse_callbacks: Option<Box<ParseCallbacks>>,
    pub codegen_config: CodegenConfig,
    pub conservative_inline_namespaces: bool,
    pub generate_comments: bool,
    pub generate_inline_functions: bool,
    pub whitelist_recursively: bool,
    pub objc_extern_crate: bool,
    pub enable_mangling: bool,
    pub prepend_enum_name: bool,
}
Deprecated

Configuration options for generated bindings.

Deprecated: use a Builder instead.

Fields

Deprecated

The set of types that have been blacklisted and should not appear anywhere in the generated code.

Deprecated

The set of types that should be treated as opaque structures in the generated code.

Deprecated

The set of types that we should have bindings for in the generated code.

This includes all types transitively reachable from any type in this set. One might think of whitelisted types/vars/functions as GC roots, and the generated Rust code as including everything that gets marked.

Deprecated

Whitelisted functions. See docs for whitelisted_types for more.

Deprecated

Whitelisted variables. See docs for whitelisted_types for more.

Deprecated

The enum patterns to mark an enum as bitfield.

Deprecated

The enum patterns to mark an enum as constant.

Deprecated

Whether we should generate builtins or not.

Deprecated

The set of libraries we should link in the generated Rust code.

Deprecated

True if we should dump the Clang AST for debugging purposes.

Deprecated

True if we should dump our internal IR for debugging purposes.

Deprecated

Output graphviz dot file.

Deprecated

True if we should emulate C++ namespaces with Rust modules in the generated bindings.

Deprecated

True if we should avoid mangling names with namespaces.

Deprecated

True if we should generate layout tests for generated structures.

Deprecated

True if we should derive Debug trait implementations for C/C++ structures and types.

Deprecated

True if we should derive Default trait implementations for C/C++ structures and types.

Deprecated

True if we can use unstable Rust code in the bindings, false if we cannot.

Deprecated

True if we should avoid using libstd to use libcore instead.

Deprecated

An optional prefix for the "raw" types, like c_int, c_void...

Deprecated

True if we should generate constant names that are directly under namespaces.

Deprecated

True if we should use MSVC name mangling rules.

Deprecated

Whether we should convert float types to f32/f64 types.

Deprecated

The set of raw lines to prepend to the generated Rust code.

Deprecated

The set of arguments to pass straight through to Clang.

Deprecated

The input header file.

Deprecated

Unsaved files for input.

Deprecated

Generate a dummy C/C++ file that includes the header and has dummy uses of all types defined therein. See the uses module for more.

Deprecated

A user-provided visitor to allow customizing different kinds of situations.

Deprecated

Which kind of items should we generate? By default, we'll generate all of them.

Deprecated

Whether to treat inline namespaces conservatively.

See the builder method description for more details.

Deprecated

Wether to keep documentation comments in the generated output. See the documentation for more details.

Deprecated

Whether to generate inline functions. Defaults to false.

Deprecated

Wether to whitelist types recursively. Defaults to true.

Deprecated

Intead of emitting 'use objc;' to files generated from objective c files, generate '#[macro_use] extern crate objc;'

Deprecated

Whether to use the clang-provided name mangling. This is true and probably needed for C++ features.

However, some old libclang versions seem to return incorrect results in some cases for non-mangled functions, see 1, so we allow disabling it.

Deprecated

Whether to prepend the enum name to bitfield or constant variants.

Trait Implementations

impl Debug for BindgenOptions
[src]

Formats the value using the given formatter.

impl UnwindSafe for BindgenOptions
[src]

TODO(emilio): This is sort of a lie (see the error message that results from removing this), but since we don't share references across panic boundaries it's ok.

impl Default for BindgenOptions
[src]

Returns the "default value" for a type. Read more