You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure I want to require that Identity and Recipient are cloneable. That might be reasonable for some (or even most) Recipient implementations, but Identity implementations are much more likely to not be suitable for cloning (e.g. if they wrap a connection to an HSM or KMS; the latter could also be the case for Recipient).
What specific use cases did you encounter that were unwieldy without a Clone bound?
After #523, it will no longer be necessary to clone Recipient impls in order to use them across multiple files (aligning the API with how Identity was used for decryption).
For ergonomics it would nice to be able to clone the
Identity
andRecipient
traits, had a few usecases where it becomes unwieldy without it.Probably the easiest way to implement this is with https://github.com/dtolnay/dyn-clone,
There is also a convenience macro wrapper for that crate here: https://github.com/kardeiz/objekt-clonable, which ends up with minimal extra code and just adding supertraits, such as:
Would also have to derive clone on some internal structs that use it too, Stanza, Header, BaseDecryptor, etc.
Could whip up a draft PR if this is something you be interested in. Thanks.
The text was updated successfully, but these errors were encountered: