Skip to main content

RedactingDebug

Derive Macro RedactingDebug 

Source
#[derive(RedactingDebug)]
{
    // Attributes available to this derive:
    #[redact]
    #[raw]
}
Expand description

Derives a Debug impl requiring every named field to declare its redaction treatment.

Every field of the struct it’s applied to must carry exactly one of #[redact(url)], #[redact(key)], or #[raw] — an unannotated, ambiguous, or conflicting field fails to compile instead of silently rendering a credential-shaped value unredacted (#1238).

Only structs with named fields are supported; an enum, tuple struct, or unit struct is a compile error naming why. See deps_core::redact_debug’s re-exported doc for the field attribute contract and a runnable example.