UX: Cloneable traits [age crate]
mberry opened this issue · 0 comments
mberry commented
For ergonomics it would nice to be able to clone the Identity
and Recipient
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:
#[clonable]
pub trait Recipient: Clone {
...
}
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.