Struct Builder

Source
pub struct Builder { /* private fields */ }
Expand description

A builder for generating a bindings header.

Implementations§

Source§

impl Builder

Source

pub fn new() -> Builder

Source

pub fn with_header<S: AsRef<str>>(self, header: S) -> Builder

Source

pub fn with_no_includes(self) -> Builder

Source

pub fn with_include<S: AsRef<str>>(self, include: S) -> Builder

Source

pub fn with_sys_include<S: AsRef<str>>(self, include: S) -> Builder

Source

pub fn with_after_include<S: AsRef<str>>(self, line: S) -> Builder

Source

pub fn with_trailer<S: AsRef<str>>(self, trailer: S) -> Builder

Source

pub fn with_include_guard<S: AsRef<str>>(self, include_guard: S) -> Builder

Source

pub fn with_pragma_once(self, pragma_once: bool) -> Builder

Source

pub fn with_autogen_warning<S: AsRef<str>>(self, autogen_warning: S) -> Builder

Source

pub fn with_include_version(self, include_version: bool) -> Builder

Source

pub fn with_namespace<S: AsRef<str>>(self, namespace: S) -> Builder

Source

pub fn with_namespaces<S: AsRef<str>>(self, namespaces: &[S]) -> Builder

Source

pub fn with_using_namespaces<S: AsRef<str>>(self, namespaces: &[S]) -> Builder

Source

pub fn with_braces(self, braces: Braces) -> Builder

Source

pub fn with_line_length(self, line_length: usize) -> Builder

Source

pub fn with_tab_width(self, tab_width: usize) -> Builder

Source

pub fn with_language(self, language: Language) -> Builder

Source

pub fn with_cpp_compat(self, cpp_compat: bool) -> Builder

Source

pub fn with_style(self, style: Style) -> Builder

Source

pub fn include_item<S: AsRef<str>>(self, item_name: S) -> Builder

Source

pub fn exclude_item<S: AsRef<str>>(self, item_name: S) -> Builder

Source

pub fn rename_item<S: AsRef<str>>(self, from: S, to: S) -> Builder

Source

pub fn with_item_prefix<S: AsRef<str>>(self, prefix: S) -> Builder

Source

pub fn with_parse_deps(self, parse_deps: bool) -> Builder

Source

pub fn with_parse_include<S: AsRef<str>>(self, include: &[S]) -> Builder

Source

pub fn with_parse_exclude<S: AsRef<str>>(self, exclude: &[S]) -> Builder

Source

pub fn with_parse_expand<S: AsRef<str>>(self, expand: &[S]) -> Builder

Source

pub fn with_parse_expand_all_features( self, expand_all_features: bool, ) -> Builder

Source

pub fn with_parse_expand_default_features( self, expand_default_features: bool, ) -> Builder

Source

pub fn with_parse_expand_features<S: AsRef<str>>( self, expand_features: &[S], ) -> Builder

Source

pub fn with_parse_expand_profile(self, profile: Profile) -> Builder

Source

pub fn with_parse_extra_bindings<S: AsRef<str>>( self, extra_bindings: &[S], ) -> Builder

Source

pub fn with_only_target_dependencies( self, only_target_dependencies: bool, ) -> Builder

Source

pub fn with_documentation(self, documentation: bool) -> Builder

Source

pub fn with_target_os_define( self, platform: &str, preprocessor_define: &str, ) -> Builder

Source

pub fn with_define( self, key: &str, value: &str, preprocessor_define: &str, ) -> Builder

Source

pub fn with_config(self, config: Config) -> Builder

Source

pub fn with_std_types(self, std_types: bool) -> Builder

Source

pub fn with_src<P: AsRef<Path>>(self, src: P) -> Builder

Source

pub fn with_crate<P: AsRef<Path>>(self, lib_dir: P) -> Builder

Source

pub fn with_crate_and_name<P: AsRef<Path>, S: AsRef<str>>( self, lib_dir: P, binding_lib_name: S, ) -> Builder

Source

pub fn with_lockfile<P: AsRef<Path>>(self, lockfile: P) -> Builder

Source

pub fn generate(self) -> Result<Bindings, Error>

Trait Implementations§

Source§

impl Clone for Builder

Source§

fn clone(&self) -> Builder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Builder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.