Module :: clone_dyn
Derive to clone dyn structures.
By default, Rust does not support cloning for trait objects due to the Clone trait requiring compile-time knowledge of the type's size. The clone_dyn crate addresses this limitation through procedural macros, allowing for cloning collections of trait objects. The crate's purpose is straightforward: it allows for easy cloning of dyn< Trait > with minimal effort and complexity, accomplished by applying the derive attribute to the trait.
Alternative
There are few alternatives dyn-clone, dyn-clonable. Unlike other options, this solution is more concise and demands less effort to use, all without compromising the quality of the outcome. Also, you can ask an inquiry and get answers, which is problematic in the case of alternatives.
Basic use-case
#
#
To add to your project
Try out from the repository