From ee01884d90fa30dca097f597068da89d6efe77a2 Mon Sep 17 00:00:00 2001 From: Philipp Kaiser Date: Fri, 8 Jan 2021 14:58:25 +0100 Subject: [PATCH] [#644] Add parse extra bindings to builder --- src/bindgen/builder.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bindgen/builder.rs b/src/bindgen/builder.rs index 5f984ec..4ca7e85 100644 --- a/src/bindgen/builder.rs +++ b/src/bindgen/builder.rs @@ -231,6 +231,15 @@ impl Builder { self } + #[allow(unused)] + pub fn with_parse_extra_bindings>(mut self, extra_bindings: &[S]) -> Builder { + self.config.parse.extra_bindings = extra_bindings + .iter() + .map(|x| String::from(x.as_ref())) + .collect(); + self + } + #[allow(unused)] pub fn with_documentation(mut self, documentation: bool) -> Builder { self.config.documentation = documentation;