Almost every module in client::requests defines their own Pending struct,
wrapping a Boxed future, using copy+pasted code. This patch implements a
templated Pending type in the client::requests module, and uses it in submodules.
The patch also sets up a type alias called Pending in each of the submodules,
to retain backwards compatibility.
This is also laying some groundwork for opening up Sender to different implementations, where the Pending type may be a generic instead.
Almost every module in client::requests defines their own Pending struct, wrapping a Boxed future, using copy+pasted code. This patch implements a templated Pending type in the client::requests module, and uses it in submodules.
The patch also sets up a type alias called Pending in each of the submodules, to retain backwards compatibility.
This is also laying some groundwork for opening up
Sender
to different implementations, where thePending
type may be a generic instead.