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: UnsafePolicyparse_only: boolexclude_impls: boolallowlist: Allowlistinstantiable: Vec<String>rust_types: Vec<RustPath>subclasses: Vec<Subclass>extern_rust_funs: Vec<RustFun>concretes: ConcretesMapexterns: ExternCppTypeMap

Implementations

Whether to avoid generating the standard helpful utility functions which we normally include in every mod.

Items which the user has explicitly asked us to generate; we should raise an error if we weren’t able to do so.

The allowlist of items to be passed into bindgen, if any.

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:

  1. As directives to bindgen
  2. 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.

Get a hash of the contents of this include_cpp! block.

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.

Return the filename to which generated .rs should be written.

Used in reduction to substitute all included headers with a single preprocessed replacement.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.