I have a struct with two members each of which is a pretty complicated type. If I were to write out the types in full it would look something like the following which isn't valid since _ can not be used in this context:
However, this isn't ideal since the struct is now generic over Rx and Tx with respect to the specified bounds which is not the functionality that I wanted and now forces me to specify these types a level up.
Is there a way of defining my struct without writing out the full type signatures but at the same time not being generic over Rx and Tx?
True, but consider if instead I needed to store the result of an async block or function into a struct? How would I do that considering that the type of the returned Future is a hidden compiler generated type?
Alternatively, you may be able to use the unstable type_alias_impl_trait feature to define a type alias for a closure or Future that's otherwise unnameable.
Actually... correct me if I am wrong here, @2e71828, but the syntax that I propose would be available if the type_alias_impl_trait feature were to be stabilized, right?