[−][src]Trait secrecy::SerializableSecret
Marker trait for secrets which can be serialized directly by serde
.
Since this provides a non-explicit exfiltration path for secrets,
types must explicitly opt into this.
If you are working with a SecretString
, SecretVec
, etc. type, they
do NOT impl this trait by design. Instead, if you really want to have
serde
automatically serialize those types, use the serialize_with
attribute to specify a serializer that exposes the secret: