Expand description
This module takes the types and paths from ‘item_collector’ module, and will recursively find all the fields with the specified PII-value, and save those fields with the full path.
E.g. MyStruct.sub_struct.mystery_field.bitcoin_wallet_key
, meaning you can find the full path
from the top-level type all the way down to wherever the field with the correct PII-value resides.
Structs§
- Fields
With Attribute - PiiFinder
- This is the visitor that actually generates the pii_types, it has a lot of associated data because it using the Visit trait from syn-crate means I cannot add data as arguments. The ‘pii_types’ field can be regarded as the output.
- Type
AndField - The name of a field along with its type. Used for the path to a PII-field.
Functions§
- get_
attributes 🔒 - Collects all the attributes from a given field.
- get_
field_ 🔒types - This function extracts the type names from a complex type and stores them in a BTreeSet.
It’s designed to handle nested generic types, such as
Foo<Bar<Baz>>
, and return [“Foo”, “Bar”, “Baz”]. - get_
matching_ 🔒scoped_ paths - Finds the full path to the given types by comparing them to the types in the scope.
- get_
type_ 🔒paths_ from_ type