Struct bindgen::Builder
[−]
[src]
pub struct Builder<'a> { /* fields omitted */ }
A builder to generate bindings.
Methods
impl<'a> Builder<'a>
[src]
fn new() -> Builder<'a>
Returns a new builder for Bindgen.
fn header<T: Into<String>>(&mut self, header: T) -> &mut Self
Add a C header to parse.
fn match_pat<T: Into<String>>(&mut self, arg: T) -> &mut Self
Add a pattern to filter which file to generate a binding for.
fn clang_arg<T: Into<String>>(&mut self, arg: T) -> &mut Self
Add a clang CLI argument.
fn link<T: Into<String>>(&mut self, library: T, link_type: LinkType) -> &mut Self
Add a library to link.
fn forbid_unknown_types(&mut self) -> &mut Self
Force bindgen to exit if a type is not recognized.
fn builtins(&mut self) -> &mut Self
Control if we should use the c builtins like __va_list
.
fn derive_debug(&mut self, derive_debug: bool) -> &mut Self
Control if the generated structs will derive Debug.
fn rust_enums(&mut self, value: bool) -> &mut Self
Control if bindgen should convert the C enums to rust enums or rust constants.
fn log(&mut self, logger: &'a Logger) -> &mut Self
Set the logger to use.
fn override_enum_ty<T: Into<String>>(&mut self, ty: T) -> &mut Self
Overrides the type used to represent a C enum.
fn remove_prefix<T: Into<String>>(&mut self, ty: T) -> &mut Self
Set the prefix to remove from all the symbols, like libfoo_
.
fn emit_ast(&mut self, value: bool) -> &mut Self
Controls if bindgen should also print the parsed AST (for debug).
fn use_core(&mut self, value: bool) -> &mut Self
Defines if we should use std
or core
for Option
and such.
fn ctypes_prefix<T: Into<Vec<String>>>(&mut self, prefix: T) -> &mut Self
Sets the prefix to use for c_void and others.
fn generate(&self) -> Result<Bindings, ()>
Generate the binding using the options previously set.
Trait Implementations
impl<'a> Debug for Builder<'a>
[src]
impl<'a> Clone for Builder<'a>
[src]
fn clone(&self) -> Builder<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more