Struct autocxx_engine::IncludeCppEngine [−][src]
Core of the autocxx engine.
The basic idea is this. We will run bindgen which will spit
out a ton of Rust code corresponding to all the types and functions
defined in C++. We’ll then post-process that bindgen output
into a form suitable for ingestion by cxx.
(It’s the BridgeConverter mod which does that.)
Along the way, the bridge_converter might tell us of additional
C++ code which we should generate, e.g. wrappers to move things
into and out of UniquePtrs.
Here’s a zoomed-in view of the “conversion” part:
Implementations
impl IncludeCppEngine[src]
pub fn new_from_syn(mac: Macro) -> Result<Self>[src]
pub fn get_rs_filename(&self) -> String[src]
pub fn generate_rs(&self) -> TokenStream2[src]
Generate the Rust bindings. Call generate first.
pub fn generate(
&mut self,
inc_dirs: Vec<PathBuf>,
definitions: &[impl AsRef<str>],
dep_recorder: Option<Box<dyn RebuildDependencyRecorder>>
) -> Result<()>[src]
&mut self,
inc_dirs: Vec<PathBuf>,
definitions: &[impl AsRef<str>],
dep_recorder: Option<Box<dyn RebuildDependencyRecorder>>
) -> Result<()>
Actually examine the headers to find out what needs generating. Most errors occur at this stage as we fail to interpret the C++ headers properly.
See documentation for this type for flow diagrams and more details.
pub fn generate_h_and_cxx(&self) -> Result<GeneratedCpp, Error>[src]
Generate C++-side bindings for these APIs. Call generate first.
pub fn include_dirs(&self) -> &Vec<PathBuf>[src]
Return the include directories used for this include_cpp invocation.
Trait Implementations
impl Parse for IncludeCppEngine[src]
fn parse(input: ParseStream<'_>) -> ParseResult<Self>[src]
Auto Trait Implementations
impl RefUnwindSafe for IncludeCppEngine
impl !Send for IncludeCppEngine
impl !Sync for IncludeCppEngine
impl Unpin for IncludeCppEngine
impl UnwindSafe for IncludeCppEngine
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,