[−][src]Struct rust_swig::Generator
Generator
is a main point of rust_swig
.
It expands rust macroses and generates not rust code.
It designed to use inside build.rs
.
Implementations
impl Generator
[src]
pub fn new(config: LanguageConfig) -> Generator
[src]
pub fn with_pointer_target_width(self, pointer_target_width: usize) -> Self
[src]
By default we get pointer_target_width via cargo (more exactly CARGO_CFG_TARGET_POINTER_WIDTH), but you can change default value via this method
pub fn rustfmt_bindings(self, doit: bool) -> Self
[src]
Set whether rustfmt should format the generated bindings.
pub fn remove_not_generated_files_from_output_directory(
self,
doit: bool
) -> Self
[src]
self,
doit: bool
) -> Self
If true removes not generated by rust_swig files from output directory, suitable for removing obsolete files. Warning! May remove your files if turn on, so by default false
pub fn merge_type_map(self, id_of_code: &str, code: &str) -> Generator
[src]
Add new foreign langauge type <-> Rust mapping
pub fn expand<S, D>(self, crate_name: &str, src: S, dst: D) where
S: AsRef<Path>,
D: AsRef<Path>,
[src]
S: AsRef<Path>,
D: AsRef<Path>,
Auto Trait Implementations
impl !RefUnwindSafe for Generator
impl !Send for Generator
impl !Sync for Generator
impl Unpin for Generator
impl !UnwindSafe for Generator
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,
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.
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>,