pub trait TupleCopy: TupleClone {
// Required method
fn tuple_copy(&self) -> Self;
}Expand description
A trait for copying tuples.
Part of the tuplities crate.
Required Methods§
Sourcefn tuple_copy(&self) -> Self
fn tuple_copy(&self) -> Self
Copies self into a new instance.
§Examples
use tuplities_copy::TupleCopy;
let tuple = (1, "hello", 3.14);
let copied_tuple = tuple.tuple_copy();
assert_eq!(tuple, copied_tuple);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.