pub trait AuthUserMeta {
Show 16 methods
// Provided methods
fn table() -> &'static str { ... }
fn col_id() -> &'static str { ... }
fn col_email() -> &'static str { ... }
fn col_name() -> &'static str { ... }
fn col_image() -> &'static str { ... }
fn col_email_verified() -> &'static str { ... }
fn col_created_at() -> &'static str { ... }
fn col_updated_at() -> &'static str { ... }
fn col_metadata() -> &'static str { ... }
fn col_username() -> &'static str { ... }
fn col_display_username() -> &'static str { ... }
fn col_two_factor_enabled() -> &'static str { ... }
fn col_role() -> &'static str { ... }
fn col_banned() -> &'static str { ... }
fn col_ban_reason() -> &'static str { ... }
fn col_ban_expires() -> &'static str { ... }
}Expand description
SQL column/table metadata for AuthUser entities.
These Auth*Meta traits are used by the SqlxAdapter to build SQL
statements (INSERT/UPDATE/DELETE/SELECT) using the correct table and column
names for your entity types.
§Customizing mappings
When using the derive macros (#[derive(AuthUser)], etc.), you can customize
the names used by the generated Auth*Meta impls:
- Struct-level: override the table name with
#[auth(table = "...")] - Field-level: override the SQL column name with
#[auth(column = "...")]
§FromRow consistency
If you implement sqlx::FromRow manually, ensure the column names you read
match the names returned by the corresponding Auth*Meta trait. Alternatively,
you can use #[auth(from_row)] to generate a FromRow implementation that
stays in sync with the Auth*Meta mappings.
Provided Methods§
fn table() -> &'static str
fn col_id() -> &'static str
fn col_email() -> &'static str
fn col_name() -> &'static str
fn col_image() -> &'static str
fn col_email_verified() -> &'static str
fn col_created_at() -> &'static str
fn col_updated_at() -> &'static str
fn col_metadata() -> &'static str
fn col_username() -> &'static str
fn col_display_username() -> &'static str
fn col_two_factor_enabled() -> &'static str
fn col_role() -> &'static str
fn col_banned() -> &'static str
fn col_ban_reason() -> &'static str
fn col_ban_expires() -> &'static str
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.