Struct com_scrape::Generator
source · pub struct Generator { /* private fields */ }
Expand description
Builder struct for configuring and generating bindings.
Implementations§
source§impl Generator
impl Generator
sourcepub fn include_path<T: AsRef<Path>>(self, path: T) -> Self
pub fn include_path<T: AsRef<Path>>(self, path: T) -> Self
Adds path
to the list of include paths to pass to libclang
.
sourcepub fn skip_types<'a, T: AsRef<[&'a str]>>(self, types: T) -> Self
pub fn skip_types<'a, T: AsRef<[&'a str]>>(self, types: T) -> Self
Do not generate bindings for types
.
sourcepub fn skip_interface_trait<T: AsRef<str>>(self, interface: T) -> Self
pub fn skip_interface_trait<T: AsRef<str>>(self, interface: T) -> Self
Do not generate an interface trait for interface
.
sourcepub fn skip_interface_traits<'a, T: AsRef<[&'a str]>>(
self,
interfaces: T
) -> Self
pub fn skip_interface_traits<'a, T: AsRef<[&'a str]>>( self, interfaces: T ) -> Self
Do not generate interface traits for interfaces
.
sourcepub fn constant_parser<F>(self, f: F) -> Self
pub fn constant_parser<F>(self, f: F) -> Self
Registers a callback for parsing constant definitions which libclang
is not able to
evaluate.
The callback will be passed a slice of tokens, and its output (if not None
) will be
included in the generated bindings.
sourcepub fn iid_generator<F>(self, f: F) -> Self
pub fn iid_generator<F>(self, f: F) -> Self
Registers a callback which should, when given the name of an interface as a string, return
a string containing a Rust expression evaluating to the Guid
value for that interface.
sourcepub fn query_interface_fn<T: AsRef<str>>(self, f: T) -> Self
pub fn query_interface_fn<T: AsRef<str>>(self, f: T) -> Self
Registers a function which will be called by the implementations of
Unknown::query_interface
for generated interface types.
The function should be in scope where the resulting bindings are placed, and it should have
the same type signature as Unknown::query_interface
.
sourcepub fn add_ref_fn<T: AsRef<str>>(self, f: T) -> Self
pub fn add_ref_fn<T: AsRef<str>>(self, f: T) -> Self
Registers a function which will be called by the implementations of Unknown::add_ref
for
generated interface types.
The function should be in scope where the resulting bindings are placed, and it should have
the same type signature as Unknown::add_ref
.
sourcepub fn release_fn<T: AsRef<str>>(self, f: T) -> Self
pub fn release_fn<T: AsRef<str>>(self, f: T) -> Self
Registers a function which will be called by the implementations of Unknown::release
for
generated interface types.
The function should be in scope where the resulting bindings are placed, and it should have
the same type signature as Unknown::release
.