pub struct CodegenBuilder { /* private fields */ }Expand description
Builder pattern for easy configuration in build.rs
Implementations§
Source§impl CodegenBuilder
impl CodegenBuilder
Sourcepub fn new(schema_file: impl AsRef<Path>) -> Self
pub fn new(schema_file: impl AsRef<Path>) -> Self
Create a new builder with the given schema file
Sourcepub fn output_dir(self, dir: impl AsRef<Path>) -> Self
pub fn output_dir(self, dir: impl AsRef<Path>) -> Self
Set the output directory for both structs and DAOs
Sourcepub fn output_structs_dir(self, dir: impl AsRef<Path>) -> Self
pub fn output_structs_dir(self, dir: impl AsRef<Path>) -> Self
Set the output directory for structs only
Sourcepub fn output_dao_dir(self, dir: impl AsRef<Path>) -> Self
pub fn output_dao_dir(self, dir: impl AsRef<Path>) -> Self
Set the output directory for DAOs only
Sourcepub fn include_tables(self, tables: &[&str]) -> Self
pub fn include_tables(self, tables: &[&str]) -> Self
Set tables to include (comma-separated or array)
Sourcepub fn exclude_tables(self, tables: &[&str]) -> Self
pub fn exclude_tables(self, tables: &[&str]) -> Self
Set tables to exclude (comma-separated or array)
Sourcepub fn structs_only(self) -> Self
pub fn structs_only(self) -> Self
Generate only structs, no DAOs
Sourcepub fn models_module(self, name: &str) -> Self
pub fn models_module(self, name: &str) -> Self
Set the models module name
Sourcepub fn dao_module(self, name: &str) -> Self
pub fn dao_module(self, name: &str) -> Self
Set the DAO module name
Auto Trait Implementations§
impl Freeze for CodegenBuilder
impl RefUnwindSafe for CodegenBuilder
impl Send for CodegenBuilder
impl Sync for CodegenBuilder
impl Unpin for CodegenBuilder
impl UnwindSafe for CodegenBuilder
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