pub fn write(&mut self) -> String {
        let externs = self.write_forward_decls();
        let generator = self.write_annotation_generator();
        let argstruct = self.write_argstruct();
        let callback = self.write_callback();
        let callable = self.write_replaced_function();
        let code = format!(
            include_str!("resources/file.c.template"),
            externs=externs,
            function_name=self.annotation.function.func_name.to_uppercase(),
            generator=generator,
            argstruct=argstruct,
            callback=callback,
            callable=callable
        );

        // Attempt to format the code with clang-format.
        let config = PopenConfig {
            stdin: Redirection::Pipe,
            stdout: Redirection::Pipe,
            stderr: Redirection:: Pipe, 
            ..Default::default()
        };

        Popen::create(&["clang-format"], config)
            .and_then(|mut p| p.communicate(Some(&code)))
            .ok()
            .map(|(out, _)| out.unwrap())
            .unwrap_or(code)
    }
/// Writes a C header file as a string.
Writes a C header file as a string.
Writes a C header file as a string .
pub fn write(&mut self) -> String {
        let externs = self.write_forward_decls();
        let generator = self.write_annotation_generator();
        let argstruct = self.write_argstruct();
        let callback = self.write_callback();
        let callable = self.write_replaced_function();
        let code = format!(
            include_str!("resources/file.c.template"),
            externs=externs,
            function_name=self.annotation.function.func_name.to_uppercase(),
            generator=generator,
            argstruct=argstruct,
            callback=callback,
            callable=callable
        );
        // Attempt to format the code with clang-format.
        let config = PopenConfig {
            stdin: Redirection::Pipe,
            stdout: Redirection::Pipe,
            stderr: Redirection:: Pipe, 
            ..Default::default()
        };
        Popen::create(&["clang-format"], config)
            .and_then(|mut p| p.communicate(Some(&code)))
            .ok()
            .map(|(out, _)| out.unwrap())
            .unwrap_or(code)
    }
pub fn write ( & mut self ) -> String { let externs = self . write_forward_decls ( ) ; let generator = self . write_annotation_generator ( ) ; let argstruct = self . write_argstruct ( ) ; let callback = self . write_callback ( ) ; let callable = self . write_replaced_function ( ) ; let code = format ! ( include_str ( " " ) externs externs function_name self annotation function func_name to_uppercase ( ) generator generator argstruct argstruct callback callback callable callable ) ; // Attempt to format the code with clang-format. let config = PopenConfig { stdin : Redirection :: Pipe , stdout : Redirection :: Pipe , stderr : Redirection :: Pipe , .. Default :: default ( ) } ; Popen :: create ( & [ " " ] , config ) . and_then ( | mut p | p . communicate ( Some ( & code ) ) ) . ok ( ) . map ( | ( out , _ ) | out . unwrap ( ) ) . unwrap_or ( code ) }
Writes a C header file as a string.
Writes a C header file as a string .
&mut self