I really don't know how to answer "why", it's complicated and has nothing to do with the question.
The real case is that type T is a serialization type, the getSlice (not the real name) will first extract bytes, then deserialize it, then put the decoded object to a proper vector.
Again, I just designed it like this, and getSlice is a function to choose a proper vector by a given type, that's "why" I can expain for now.
Given that, I'd say it is a good solution. AFAIK, trait items are the only way in Rust to "choose" a type in a generic context, so long as you're not using macros.
With macros, the situation changes a bit. With standard macros, you might be able to do it. With proc macros, you'd definitely be able to do this. Whether you want to take that much effort depends on how many types you're dealing with.