pub struct PythonGenerator {
pub use_type_hints: bool,
pub generate_docstrings: bool,
}Expand description
Python generator for creating Python functions from statutes.
Fields§
§use_type_hints: boolUse type hints
generate_docstrings: boolGenerate docstrings
Implementations§
Trait Implementations§
Source§impl CodeGenerator for PythonGenerator
impl CodeGenerator for PythonGenerator
Source§fn generate(&self, doc: &LegalDocument) -> DslResult<String>
fn generate(&self, doc: &LegalDocument) -> DslResult<String>
Generates code for the entire document.
Source§fn target_language(&self) -> &str
fn target_language(&self) -> &str
Returns the target language name.
Source§fn file_extension(&self) -> &str
fn file_extension(&self) -> &str
Returns file extension for generated code.
Auto Trait Implementations§
impl Freeze for PythonGenerator
impl RefUnwindSafe for PythonGenerator
impl Send for PythonGenerator
impl Sync for PythonGenerator
impl Unpin for PythonGenerator
impl UnwindSafe for PythonGenerator
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