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§

source§

impl IncludeCppConfig

source

pub fn get_pod_requests(&self) -> &[String]

source

pub fn get_mod_name(&self) -> Ident

source

pub fn exclude_utilities(&self) -> bool

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

source

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.

source

pub fn bindgen_allowlist(&self) -> Option<Box<dyn Iterator<Item = String> + '_>>

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

source

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:

  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.
source

pub fn is_on_blocklist(&self, cpp_name: &str) -> bool

source

pub fn is_on_constructor_blocklist(&self, cpp_name: &str) -> bool

source

pub fn get_blocklist(&self) -> impl Iterator<Item = &String>

source

pub fn get_hash(&self) -> u64

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

source

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.

source

pub fn get_makestring_name(&self) -> String

source

pub fn is_rust_type(&self, id: &Ident) -> bool

source

pub fn superclasses(&self) -> impl Iterator<Item = &String>

source

pub fn is_subclass_holder(&self, id: &str) -> bool

source

pub fn get_rs_filename(&self) -> String

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

source

pub fn confirm_complete(&mut self)

source

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

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for IncludeCppConfig

source§

fn default() -> IncludeCppConfig

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

impl Hash for IncludeCppConfig

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

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

impl Parse for IncludeCppConfig

source§

fn parse(input: ParseStream<'_>) -> ParseResult<Self>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.