Skip to main content

Module secret

Module secret 

Source
Expand description

Redacting wrapper for secret string values.

Secret holds sensitive credential material (API tokens, session tokens) and guarantees it cannot leak through Debug formatting: the hand-written Debug impl prints <redacted> instead of the value. The type deliberately implements neither Display nor any serde traits, so a secret cannot be {}-formatted or accidentally serialized; the only way out is an explicit, greppable expose_secret call.

Structsยง

Secret
A string secret that redacts itself in Debug output.