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)], #[derive(SensitiveDisplay)], #[derive(NotSensitive)], and #[derive(NotSensitiveDisplay)]. It:

  • reads #[sensitive(...)] and #[not_sensitive_display(...)] attributes
  • emits trait implementations for redaction and logging integration

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, along with slog::Value / SlogRedacted and TracingRedacted.
NotSensitiveDisplay
Derives redactable::RedactableDisplay for types with no sensitive data.
Sensitive
Derives redactable::RedactableContainer (and related impls) for structs and enums.
SensitiveDisplay
Derives redactable::RedactableDisplay using a display template.