pub struct PythonCodegen { /* private fields */ }Expand description
Code generator for Python type stubs and PyO3 bindings.
This generator creates Python type stubs (.pyi) and optionally PyO3 binding code from TensorLogic schemas.
Implementations§
Source§impl PythonCodegen
impl PythonCodegen
Sourcepub fn with_dataclasses(self, enable: bool) -> Self
pub fn with_dataclasses(self, enable: bool) -> Self
Set whether to use dataclasses.
Sourcepub fn generate(&self, table: &SymbolTable) -> String
pub fn generate(&self, table: &SymbolTable) -> String
Generate complete Python module from a symbol table.
Auto Trait Implementations§
impl Freeze for PythonCodegen
impl RefUnwindSafe for PythonCodegen
impl Send for PythonCodegen
impl Sync for PythonCodegen
impl Unpin for PythonCodegen
impl UnwindSafe for PythonCodegen
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