Skip to main content

register_models

Function register_models 

Source
pub fn register_models(models: &mut ModelSet)
Expand description

Register every model Tablo ships in models: AdminUser, AuthSession, ColumnPreference, AuthToken, AuthThrottle and StoredNotification, and AuthFactor with the two-factor feature.

models! calls it; call it directly when the app builds its ModelSet by hand. A model the panel never reads costs an empty table and nothing else.

Toasty names each table after its model, so an app with a model of one of these names, such as its own AdminUser beside a custom authenticator, cannot register both: it lists the models its panel reads in [toasty::models!] instead.