Due to the way generics are implemented in Rust (monomorphisation), every generic function ends up creating a copy for every impl of the trait that uses the function. The most common trick to get around this (especially for T: AsRef<A>) is to make the generic function a very simple wrapper that calls a implementation function that takes &A and thus produces only one function.