pub struct CodegenConfig {
pub output_dir: PathBuf,
pub format_output: bool,
pub validate_syntax: bool,
pub model_type: String,
pub message_type: String,
}Expand description
Configuration for code generation behavior
Fields§
§output_dir: PathBufOutput directory for generated code
format_output: boolWhether to format generated code with prettyplease
validate_syntax: boolWhether to validate generated code syntax
model_type: StringModel type name (e.g., “MyModel”)
message_type: StringMessage enum name (e.g., “Message”)
Implementations§
Source§impl CodegenConfig
impl CodegenConfig
Sourcepub fn with_model_type(self, model_type: impl Into<String>) -> Self
pub fn with_model_type(self, model_type: impl Into<String>) -> Self
Set the model type name
Sourcepub fn with_message_type(self, message_type: impl Into<String>) -> Self
pub fn with_message_type(self, message_type: impl Into<String>) -> Self
Set the message type name
Sourcepub fn with_formatting(self, format_output: bool) -> Self
pub fn with_formatting(self, format_output: bool) -> Self
Enable or disable code formatting
Sourcepub fn with_validation(self, validate_syntax: bool) -> Self
pub fn with_validation(self, validate_syntax: bool) -> Self
Enable or disable syntax validation
Trait Implementations§
Source§impl Clone for CodegenConfig
impl Clone for CodegenConfig
Source§fn clone(&self) -> CodegenConfig
fn clone(&self) -> CodegenConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodegenConfig
impl Debug for CodegenConfig
Auto Trait Implementations§
impl Freeze for CodegenConfig
impl RefUnwindSafe for CodegenConfig
impl Send for CodegenConfig
impl Sync for CodegenConfig
impl Unpin for CodegenConfig
impl UnwindSafe for CodegenConfig
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