h3
h3 copied to clipboard
Drop AsyncWrite usage in h3-quinn once GATs land
We were forced to use AsyncWrite
in h3_quinn::SendStream
because Quinn only offers lifetime-bound Futures to poll for writes:
Write<'a, S>
.
Generic associated type could cancel this limitation, allowing to store them into h3_quinn::SendStream
.
This will have positive implication for performance and will remove the necessity to Pin
the stream and to downcast the error type from IOError
to quinn::WriteError
.
quinn could also be modified to expose raw poll_*
style methods alongside important futures, if a better approach is required in the mean time. That's assuming it's not practical to modify h3 to push the pinning/lifetime issues downstream.
I remember that I thought of using the poll_*
methods, but can't recall why I didn't ask for them to be made available.
I guess this solution will cancel the need of GATs whatsoever.
This should be closed after quinn 0.9.0 upgrade.