pub struct GeneratorConfig {
pub module_name: Option<String>,
pub generate_entry_functions: bool,
pub generate_view_functions: bool,
pub generate_structs: bool,
pub generate_events: bool,
pub async_functions: bool,
pub type_mapper: MoveTypeMapper,
pub include_address_constant: bool,
pub use_builder_pattern: bool,
}Expand description
Configuration for code generation.
Fields§
§module_name: Option<String>The module name for the generated code (defaults to module name from ABI).
generate_entry_functions: boolWhether to generate entry function wrappers.
generate_view_functions: boolWhether to generate view function wrappers.
generate_structs: boolWhether to generate struct definitions.
generate_events: boolWhether to generate event type helpers.
async_functions: boolWhether to generate async functions (vs sync).
type_mapper: MoveTypeMapperCustom type mapper.
include_address_constant: boolWhether to include the module address constant.
use_builder_pattern: boolWhether to generate builder pattern for entry functions.
Implementations§
Source§impl GeneratorConfig
impl GeneratorConfig
Sourcepub fn with_module_name(self, name: impl Into<String>) -> Self
pub fn with_module_name(self, name: impl Into<String>) -> Self
Sets the module name.
Sourcepub fn with_entry_functions(self, enabled: bool) -> Self
pub fn with_entry_functions(self, enabled: bool) -> Self
Enables or disables entry function generation.
Sourcepub fn with_view_functions(self, enabled: bool) -> Self
pub fn with_view_functions(self, enabled: bool) -> Self
Enables or disables view function generation.
Sourcepub fn with_structs(self, enabled: bool) -> Self
pub fn with_structs(self, enabled: bool) -> Self
Enables or disables struct generation.
Sourcepub fn with_events(self, enabled: bool) -> Self
pub fn with_events(self, enabled: bool) -> Self
Enables or disables event type generation.
Sourcepub fn with_async(self, enabled: bool) -> Self
pub fn with_async(self, enabled: bool) -> Self
Enables or disables async functions.
Sourcepub fn with_builder_pattern(self, enabled: bool) -> Self
pub fn with_builder_pattern(self, enabled: bool) -> Self
Enables builder pattern for entry functions.
Trait Implementations§
Source§impl Clone for GeneratorConfig
impl Clone for GeneratorConfig
Source§fn clone(&self) -> GeneratorConfig
fn clone(&self) -> GeneratorConfig
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 GeneratorConfig
impl Debug for GeneratorConfig
Auto Trait Implementations§
impl Freeze for GeneratorConfig
impl RefUnwindSafe for GeneratorConfig
impl Send for GeneratorConfig
impl Sync for GeneratorConfig
impl Unpin for GeneratorConfig
impl UnwindSafe for GeneratorConfig
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