pub const fn copy<T: Copy>(x: &T) -> T
🔬This is a nightly-only experimental API. (
mem_copy_fn
#98262)Expand description
Bitwise-copies a value.
This function is not magic; it is literally defined as
It is useful when you want to pass a function pointer to a combinator, rather than defining a new closure.
Example: