Trait variadics::CloneVariadic
source · pub trait CloneVariadic:
VariadicExt
+ Clone
+ Sealed {
// Required method
fn clone_ref_var(this: Self::AsRefVar<'_>) -> Self;
}
Expand description
Clone a variadic of references AsRefVar
into a variadic of owned values.
let ref_var = var_expr!(&1, &format!("hello {}", "world"), &vec![1, 2, 3]);
let clone_var = CloneVariadic::clone_ref_var(ref_var);
assert_eq!(
var_expr!(1, "hello world".to_owned(), vec![1, 2, 3]),
clone_var
);
Required Methods§
sourcefn clone_ref_var(this: Self::AsRefVar<'_>) -> Self
fn clone_ref_var(this: Self::AsRefVar<'_>) -> Self
Clone a variadic of references AsRefVar
into a variadic of owned values.
Object Safety§
This trait is not object safe.