Skip to main content

Module codegen

Module codegen 

Source

Modules§

composite_gen
crud_gen
domain_gen
entity_parser
enum_gen
struct_gen

Structs§

GeneratedFile
A generated code file with its content and required imports.

Functions§

build_module_name
Build a module name, prefixing with schema when there are multiple schemas and the schema is not a well-known default.
format_tokens_with_imports
generate
Generate all code for a given schema.
imports_for_derives
Returns the imports needed for well-known extra derives.
is_default_schema
Returns true if the schema is a well-known default (public, main, dbo).
is_rust_keyword
Returns true if the given name is a Rust reserved keyword.
normalize_module_name
Normalize a table name for use as a Rust module/filename: replace multiple consecutive underscores with a single one.