Stateless operations
scan
scan_with_config
transform
scan_and_transform
Primary configuration types
ScanConfigScanAndTransformConfigTransformationConfigTransformationStrategyMaskConfigandMaskRevealPseudonymizeConfigTokenizeConfigPrivacyContext
Results
Finding exposes entity metadata, matched text, byte and code-point ranges,
optional confidence, and detector provenance.
TransformResult contains transformed text and ordered transformations.
RestoreResult contains restored text and ordered restorations.
For repeated UTF-16 conversions on the same string, reuse
TextIndex::new(text) and call its utf16_range(byte_range) method. It accepts
overlapping or unordered ranges, validates UTF-8 boundaries, and returns the
same ranges and errors as the standalone utf16_range helper. The index borrows
the string and builds sparse checkpoints as needed.
Provider-backed manager
PrivacyManager<P, T> composes key and token provider capabilities.
transformorscan_and_transformfor key-backed pseudonymization;transform_with_contextorscan_and_transform_with_contextwhen tokenization may be selected;restorefor authorized token restoration.
KeyProvider and TokenProvider traits in application code.
DataFog Core ships no cloud-, vault-, or database-specific provider.
For exact public definitions, see the
crate source.
Structured JSON and PERSON fields
Thedatafog_core::structured module exposes discover_fields, scan,
transform, and scan_and_transform. Use StructuredScanConfig::default()
for automatic discovery or structured::parse_scan_config for explicit mappings.
PrivacyManager adds transform_structured, scan_and_transform_structured,
and restore_structured with the existing provider and scope contracts.
Paths are JSON Pointers. All ranges, including JavaScript UTF-16 ranges,
address the decoded string at that path. See person-field discovery
for aliases, policy configuration, input limits, and examples.