Secret Value Derive

link-secret-value-derive is #[derive(Duplicate)], for a type that holds a secret. Such a type has no Clone, so a copy of it is always said: its duplicate() copies each field, a field marked #[duplicate] (one holding a secret) by its own duplicate(), every other by Clone.

Using it

The trait it implements, Duplicate, must be in scope where it's derived: use link_secret_value::Duplicate; brings both the trait and the derive (Secret Values).