pub struct IncludeCppConfig {
pub inclusions: Vec<String>,
pub unsafe_policy: UnsafePolicy,
pub parse_only: bool,
pub exclude_impls: bool,
pub allowlist: Allowlist,
pub instantiable: Vec<String>,
pub rust_types: Vec<RustPath>,
pub subclasses: Vec<Subclass>,
pub extern_rust_funs: Vec<RustFun>,
pub concretes: ConcretesMap,
pub externs: ExternCppTypeMap,
pub opaquelist: Vec<String>,
/* private fields */
}
Fields§
§inclusions: Vec<String>
§unsafe_policy: UnsafePolicy
§parse_only: bool
§exclude_impls: bool
§allowlist: Allowlist
§instantiable: Vec<String>
§rust_types: Vec<RustPath>
§subclasses: Vec<Subclass>
§extern_rust_funs: Vec<RustFun>
§concretes: ConcretesMap
§externs: ExternCppTypeMap
§opaquelist: Vec<String>
Implementations§
Source§impl IncludeCppConfig
impl IncludeCppConfig
pub fn get_pod_requests(&self) -> &[String]
pub fn get_mod_name(&self) -> Ident
Sourcepub fn exclude_utilities(&self) -> bool
pub fn exclude_utilities(&self) -> bool
Whether to avoid generating the standard helpful utility functions which we normally include in every mod.
Sourcepub fn must_generate_list(&self) -> Box<dyn Iterator<Item = String> + '_>
pub fn must_generate_list(&self) -> Box<dyn Iterator<Item = String> + '_>
Items which the user has explicitly asked us to generate; we should raise an error if we weren’t able to do so.
Sourcepub fn bindgen_allowlist(&self) -> Option<Box<dyn Iterator<Item = String> + '_>>
pub fn bindgen_allowlist(&self) -> Option<Box<dyn Iterator<Item = String> + '_>>
The allowlist of items to be passed into bindgen, if any.
Sourcepub fn is_on_allowlist(&self, cpp_name: &str) -> bool
pub fn is_on_allowlist(&self, cpp_name: &str) -> bool
Whether this type is on the allowlist specified by the user.
A note on the allowlist handling in general. It’s used in two places:
- As directives to bindgen
- After bindgen has generated code, to filter the APIs which we pass to cxx.
This second pass may seem redundant. But sometimes bindgen generates unnecessary stuff.
pub fn is_on_blocklist(&self, cpp_name: &str) -> bool
pub fn is_on_constructor_blocklist(&self, cpp_name: &str) -> bool
pub fn get_blocklist(&self) -> impl Iterator<Item = &String>
pub fn get_opaquelist(&self) -> impl Iterator<Item = &String>
Sourcepub fn uniquify_name_per_mod(&self, name: &str) -> String
pub fn uniquify_name_per_mod(&self, name: &str) -> String
In case there are multiple sets of ffi mods in a single binary, endeavor to return a name which can be used to make symbols unique.
pub fn get_makestring_name(&self) -> String
pub fn is_rust_type(&self, id: &Ident) -> bool
pub fn superclasses(&self) -> impl Iterator<Item = &String>
pub fn is_subclass_holder(&self, id: &str) -> bool
Sourcepub fn get_rs_filename(&self) -> String
pub fn get_rs_filename(&self) -> String
Return the filename to which generated .rs should be written.
pub fn confirm_complete(&mut self)
Sourcepub fn replace_included_headers(&mut self, replacement: &str)
pub fn replace_included_headers(&mut self, replacement: &str)
Used in reduction to substitute all included headers with a single preprocessed replacement.
Trait Implementations§
Source§impl Debug for IncludeCppConfig
impl Debug for IncludeCppConfig
Source§impl Default for IncludeCppConfig
impl Default for IncludeCppConfig
Source§fn default() -> IncludeCppConfig
fn default() -> IncludeCppConfig
Source§impl Hash for IncludeCppConfig
impl Hash for IncludeCppConfig
Source§impl Parse for IncludeCppConfig
impl Parse for IncludeCppConfig
fn parse(input: ParseStream<'_>) -> ParseResult<Self>
Auto Trait Implementations§
impl Freeze for IncludeCppConfig
impl RefUnwindSafe for IncludeCppConfig
impl !Send for IncludeCppConfig
impl !Sync for IncludeCppConfig
impl Unpin for IncludeCppConfig
impl UnwindSafe for IncludeCppConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more