Expand description
Backend-neutral code generation shared by the AuthEntity derives.
The SeaORM and SQLx derives both generate the Auth* entity trait
implementations, the secondary-storage snapshot codec and the declared
additional-field output here, so the wire-visible accessor behavior of an
application model is identical whichever backend persists it.
Structs§
- Auth
Attributes - Parsed
#[auth(...)]container attributes. - Entity
Field - A model field with its wire name and explicitly renamed physical column.
Enums§
- Entity
Role - Insert
- What a fresh row stores in one declared field.
Functions§
- additional_
output - Generate
fn additional_fields(&self): undeclared fields and nullable username values reach configured output transforms under their wire and physical names. - auth_
account_ impl impl AuthAccount: account fields are all core fields.- auth_
session_ impl impl AuthSession: absent plugin fields return their defaults.- auth_
user_ impl impl AuthUser: absent plugin fields return their defaults.- auth_
verification_ impl impl AuthVerification: verification fields are all core fields.- camel_
case - The
lowerCamelCasewire name of a snake-case Rust field. - generated_
id - Generate an application-selected auth identifier, retaining UUID defaults.
- has_
field - insert_
values - The value a fresh row stores in every declared field except
id, in declaration order. Each backend binds its own identifier type. - is_
auth_ timestamp - Auth date fields whose mutations arrive in the core UTC representation.
- is_
known_ field - Whether a field name is a core or plugin field of the role.
- is_
option - named_
fields - The derive input’s named fields.
- optional_
field - Whether the named field exists with an
Optiontype. - parse_
auth_ attributes - Parse the role, optional ID factory and secondary-storage configuration.
SQLxalso permits an explicit table name. - secondary_
codec - Generate the secondary-storage snapshot codec over every model field.
- update_
statements - The
apply_updatebody of the role overupdateandnow: every field present inupdateis written; absent plugin fields are skipped. - validate_
core_ fields - Require every core field of the role.
Type Aliases§
- SetField
- Renders
field = valueon the active row, whereInsert::Valueis convertible into the field type withInto.Insert::Defaultis never passed.