Skip to main content

Crate fastauth_macros

Crate fastauth_macros 

Source
Expand description

Derive macros for fastauth. Use them through fastauth or fastauth_core (feature macros), which re-export each derive next to the trait it implements.

The generated code names fastauth_core when the crate depends on it directly, and fastauth::__private::core when it only depends on the fastauth facade.

Derive Macrosยง

AuthError
Implements From<E> for AuthError and ErrorCodes for an enum of plugin errors.
Fields
Implements Fields and OnTable for a struct of columns added to an existing table, plus a typed Col constant per field (two_factor_enabled becomes TWO_FACTOR_ENABLED).
Model
Implements Model and OnTable<Table = Self> for a table, plus a typed Col constant per field.