Skip to main content

Crate redaction_derive

Crate redaction_derive 

Source
Expand description

Derive macros for redaction.

This crate generates traversal code behind #[derive(Sensitive)] and #[derive(SensitiveError)]. It:

  • reads #[sensitive(...)] field attributes
  • emits a SensitiveType implementation that calls into a mapper

It does not define classifications or policies. Those live in the main redaction crate and are applied at runtime.

Derive Macrosยง

Sensitive
Derives redaction::SensitiveType (and related impls) for structs and enums.
SensitiveError
Derives redaction::SensitiveType for types that should log without Serialize.