Modules§
Structs§
- Generated
File - A generated code file with its content and required imports.
Functions§
- build_
module_ name - Build a module name, prefixing with schema only when the name collides (same table name exists in multiple schemas).
- detect_
tab_ spaces - Detect
tab_spacesfromrustfmt.tomlor.rustfmt.tomlby walking up fromstart_dir. Returns 4 (rustfmt default) if no config is found. - format_
tokens_ with_ imports - format_
tokens_ with_ imports_ and_ tab_ spaces - 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.