Struct dsync_hasezoey::GenerationConfig
source · pub struct GenerationConfig<'a> {
pub table_options: HashMap<&'a str, TableOptions<'a>>,
pub default_table_options: TableOptions<'a>,
pub connection_type: String,
pub schema_path: String,
pub model_path: String,
pub once_common_structs: bool,
pub single_model_file: bool,
pub file_mode: FileMode,
}
Fields§
§table_options: HashMap<&'a str, TableOptions<'a>>
Specific Table options for a given table
default_table_options: TableOptions<'a>
Default table options, used when not in table_options
connection_type: String
Connection type to insert Example: “diesel::SqliteConnection”
schema_path: String
diesel schema path to use Example: “crate::schema::”
model_path: String
model path to use Example: “crate::models::”
once_common_structs: bool
Only generate common structs once and put them in a common file
single_model_file: bool
Only generate a single model file instead of a folder with a “mod.rs” and a “generated.rs”
file_mode: FileMode
Set which filemode to use
Implementations§
source§impl GenerationConfig<'_>
impl GenerationConfig<'_>
pub fn table(&self, name: &str) -> TableOptions<'_>
Trait Implementations§
source§impl<'a> Clone for GenerationConfig<'a>
impl<'a> Clone for GenerationConfig<'a>
source§fn clone(&self) -> GenerationConfig<'a>
fn clone(&self) -> GenerationConfig<'a>
Returns a copy 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 moreAuto Trait Implementations§
impl<'a> RefUnwindSafe for GenerationConfig<'a>
impl<'a> Send for GenerationConfig<'a>
impl<'a> Sync for GenerationConfig<'a>
impl<'a> Unpin for GenerationConfig<'a>
impl<'a> UnwindSafe for GenerationConfig<'a>
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