Skip to main content

Crate redactable_derive

Crate redactable_derive 

Source
Expand description

Derive macros for redactable.

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

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

It does not define policy markers or text policies. Those live in the main redactable crate and are applied at runtime.

Derive Macrosยง

NotSensitive
Derives a no-op redactable::RedactableContainer implementation.
Sensitive
Derives redactable::RedactableContainer (and related impls) for structs and enums.
SensitiveData
SensitiveError
Derives redactable::RedactableContainer for types that should log without Serialize.