[][src]Struct flapigen::Generator

pub struct Generator { /* fields omitted */ }

Generator is a main point of flapigen. 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]

If true removes not generated by flapigen 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]

process src and save result of macro expansion to dst

Panics

Panics on error

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.