pub trait Duplicate {
// Required method
fn dup(&self) -> Self;
}Expand description
A trait for duplicating a value via Copy if possible, otherwise via Clone.
This trait is implemented by the #[derive(Duplicate)] attribute.
Manually implementing this trait is allowed but not recommended.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.