I don't think we'll ever completely unify these two traits, since one takes self by reference and one by value. However, we can actually get pretty close and have Serve + Clone types impl Stub. I don't remember the original motiviation of https://github.com/google/tarpc/issues/251, but I think there are probably more use cases for services acting as Stubs than vice versa.
I don't think we'll ever completely unify these two traits, since one takes self by reference and one by value. However, we can actually get pretty close and have
Serve + Clone
typesimpl Stub
. I don't remember the original motiviation of https://github.com/google/tarpc/issues/251, but I think there are probably more use cases for services acting as Stubs than vice versa.Fixes https://github.com/google/tarpc/issues/251