Skip to content

Revamp PII true/maybe/false #5158

@Dav1dde

Description

@Dav1dde

See also: #5156

Instead of defining pii is true, maybe or false, we want to be able to determine which rules are applied on a field by field basis.

Now we can still keep true, maybe, false as shortcuts, but the idea is to make it possible to specify rules instead.

For example:

#[metastructure(pii = [])]
pub pii_false: Annotated<String>,
#[metastructure(pii = ["@user-defined"])]
pub pii_maybe: Annotated<String>,
#[metastructure(pii = ["@common"])]
pub pii_true: Annotated<String>,
#[metastructure(pii = ["@email:replace", "@creditcard:replace", "@user-defined"])]
pub new_and_powerful: Annotated<String>,

It should be possible to refer to rules directly from the annotation. @user-defined is nothing more than a PII rule group, where all user defined ("advanced") rules are put into.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions