Expand description
The #[derive(Toql)] creates all the boilerplate code to make the ✨ happen.
Using the derive is the easy. However beware that the generated code size can become large
as it’s about ~3K lines of code for a medium struct.
For a bigger project, you are strongly advised to create a cargo workspace and to put your Toql derived structs into a separate crate to reduce compile time. This will pay off once your database model stabilizes.
The #[derive(ToqlEnum)] must be added on enums to implement deserialization and conversion.
Notice that ToqlEnum requires enums to have implementations for the ToString and FromStr traits.
Derive Macros§
- Toql
Enum - Derive to deserialize enums.