Struct autocxx_parser::IncludeCppConfig
source · [−]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,
/* 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
Implementations
sourceimpl 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>
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
sourceimpl Debug for IncludeCppConfig
impl Debug for IncludeCppConfig
sourceimpl Default for IncludeCppConfig
impl Default for IncludeCppConfig
sourcefn default() -> IncludeCppConfig
fn default() -> IncludeCppConfig
Returns the “default value” for a type. Read more
sourceimpl Hash for IncludeCppConfig
impl Hash for IncludeCppConfig
sourceimpl Parse for IncludeCppConfig
impl Parse for IncludeCppConfig
fn parse(input: ParseStream<'_>) -> ParseResult<Self>
Auto Trait Implementations
impl RefUnwindSafe for IncludeCppConfig
impl !Send for IncludeCppConfig
impl !Sync for IncludeCppConfig
impl Unpin for IncludeCppConfig
impl UnwindSafe for IncludeCppConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more