Attribute Macro rorm::rorm_main

source ·
#[rorm_main]
Expand description

This attribute is put on your main function.

When you build with the rorm-main feature enabled this attribute will replace your main function. The new main function will simply write all your defined models to ./.models.json to be further process by the migrator.

Make sure you have added the feature rorm-main to your crate i.e. put the following in your Cargo.toml:

[features]
rorm-main = []

If you don’t like this feature name you can pass the attribute any other name to use instead:

use rorm::rorm_main;

#[rorm_main("other-name")]
fn main() {}