[−][src]Struct bindgen::Builder
A builder to generate bindings.
Methods
impl<'a> Builder<'a>
[src]
pub fn new<T: Into<String>>(header: T) -> Builder<'a>
[src]
Returns a new builder for the C header to parse.
pub fn match_pat<T: Into<String>>(&mut self, arg: T) -> &mut Self
[src]
Add a pattern to filter which file to generate a binding for.
pub fn clang_arg<T: Into<String>>(&mut self, arg: T) -> &mut Self
[src]
Add a clang CLI argument.
pub fn link<T: Into<String>>(
&mut self,
library: T,
link_type: LinkType
) -> &mut Self
[src]
&mut self,
library: T,
link_type: LinkType
) -> &mut Self
Add a library to link.
pub fn forbid_unknown_types(&mut self) -> &mut Self
[src]
Force bindgen to exit if a type is not recognized.
pub fn builtins(&mut self) -> &mut Self
[src]
Control if we should use the c builtins like __va_list
.
pub fn derive_debug(&mut self, derive_debug: bool) -> &mut Self
[src]
Control if the generated structs will derive Debug.
pub fn rust_enums(&mut self, value: bool) -> &mut Self
[src]
Control if bindgen should convert the C enums to rust enums or rust constants.
pub fn log(&mut self, logger: &'a dyn Logger) -> &mut Self
[src]
Set the logger to use.
pub fn override_enum_ty<T: Into<String>>(&mut self, ty: T) -> &mut Self
[src]
Overrides the type used to represent a C enum.
pub fn remove_prefix<T: Into<String>>(&mut self, ty: T) -> &mut Self
[src]
Set the prefix to remove from all the symbols, like libfoo_
.
pub fn emit_ast(&mut self, value: bool) -> &mut Self
[src]
Controls if bindgen should also print the parsed AST (for debug).
pub fn use_core(&mut self, value: bool) -> &mut Self
[src]
Defines if we should use std
or core
for Option
and such.
pub fn ctypes_prefix<T: Into<Vec<String>>>(&mut self, prefix: T) -> &mut Self
[src]
Sets the prefix to use for c_void and others.
pub fn dont_convert_floats(&mut self) -> &mut Self
[src]
Defines if we should convert float and double to f32 and f64.
The format is not defined, but is the same as in rust in all the supported platforms.
pub fn convert_macros(&mut self, value: bool) -> &mut Self
[src]
Turn macros definitions into const definitions, when possible
pub fn macro_int_types<T: Into<String>, I: Iterator<Item = T>>(
&mut self,
types: I
) -> &mut Self
[src]
&mut self,
types: I
) -> &mut Self
When converting macros, convert integers that would fit in a u8
,
u16
, u32
, u64
, i8
, i16
, i32
, i64
to the corresponding
named C type the supplied list.
The Iterator
must return exactly 8 items.
pub fn generate(&self) -> Result<Bindings, ()>
[src]
Generate the binding using the options previously set.
Trait Implementations
Auto Trait Implementations
impl<'a> !Send for Builder<'a>
impl<'a> !Sync for Builder<'a>
impl<'a> Unpin for Builder<'a>
impl<'a> !UnwindSafe for Builder<'a>
impl<'a> !RefUnwindSafe for Builder<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,