Skip to main content

classify_field

Function classify_field 

Source
pub fn classify_field(
    f: &AdminField,
    context: Option<&ContextConfig>,
) -> FieldRole
Expand description

Assign a FieldRole to one field, taking context into account.

Order of precedence (highest first):

  1. Country-scoped PII names (personnummer under SE).
  2. Industry-scoped opaque identifiers (patient_id under healthcare, balance under banking).
  3. GDPR-scoped generics (email, phone).
  4. Shape: id, *_id, status, bool, datetime, numeric.
  5. Fallback: PlainText.