cloudiful-redactor
cloudiful-redactor provides structured redaction and reversible restore APIs for text, config fragments, and git diffs.
Install
Example
use ;
The crate keeps session-based restoration APIs available for reversible masking flows, including git diff handling through InputKind::GitDiff.
Each new session records only the tokens issued by that redaction operation. Restore skips valid RDX
tokens that are not authorized by that operation and reports them through RestoreResult::skipped_tokens.
Domain and person detection are disabled by default; configure RedactionRules when callers need those finding kinds.
For structured payloads with multiple text fields, reuse one SessionRedactor and finish the
session after all fields are processed. Reuse one RestoreContext when restoring those fields;
this avoids rebuilding session state and token indexes for every field.
use ;
let policy = default;
let redactor = new
.with_redaction_policy
.build;
let mut processor = new;
let redacted = processor.redact_fragment?;
let session = processor.finish_session;
let restored = new.restore_text;
# Ok::