pub struct CodeGenerator { /* private fields */ }Implementations§
Source§impl CodeGenerator
impl CodeGenerator
pub fn new(module_name: &str) -> Result<Self>
Sourcepub fn set_imported_modules(&mut self, modules: HashMap<String, ModuleInfo>)
pub fn set_imported_modules(&mut self, modules: HashMap<String, ModuleInfo>)
Set imported modules for code generation
Sourcepub fn set_generic_instantiations(
&mut self,
instantiations: Vec<(String, Vec<String>, GenericFunction)>,
)
pub fn set_generic_instantiations( &mut self, instantiations: Vec<(String, Vec<String>, GenericFunction)>, )
Set generic function instantiations for code generation
Sourcepub fn set_generic_struct_instantiations(
&mut self,
instantiations: Vec<(String, Vec<String>, GenericStruct)>,
)
pub fn set_generic_struct_instantiations( &mut self, instantiations: Vec<(String, Vec<String>, GenericStruct)>, )
Set generic struct instantiations for code generation
Sourcepub fn write_output(&self) -> Result<PathBuf>
pub fn write_output(&self) -> Result<PathBuf>
Write the generated code to a file
Auto Trait Implementations§
impl Freeze for CodeGenerator
impl RefUnwindSafe for CodeGenerator
impl Send for CodeGenerator
impl Sync for CodeGenerator
impl Unpin for CodeGenerator
impl UnsafeUnpin for CodeGenerator
impl UnwindSafe for CodeGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more