Struct safe_bindgen::LangC [−][src]
pub struct LangC { /* fields omitted */ }
Methods
impl LangC
[src]
impl LangC
Compile the header declarations then add the needed #include
s.
Currently includes:
stdint.h
stdbool.h
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn set_lib_name<T: Into<String>>(&mut self, name: T)
[src]
pub fn set_lib_name<T: Into<String>>(&mut self, name: T)
Set the name of the native library.
pub fn add_custom_code(&mut self, code: &str)
[src]
pub fn add_custom_code(&mut self, code: &str)
Adds manual C code into the top-level header - can be useful for typedefs, like e.g. opaque pointers.
pub fn transform_native_fn(
&mut self,
fn_decl: &FnDecl,
docs: &str,
name: &str,
module: &[String],
outputs: &mut HashMap<String, String>
) -> Result<(), Error>
[src]
pub fn transform_native_fn(
&mut self,
fn_decl: &FnDecl,
docs: &str,
name: &str,
module: &[String],
outputs: &mut HashMap<String, String>
) -> Result<(), Error>
Transform a Rust FFI function into a C function decl