AsyncRead
, AsyncWrite
updates using async_fn_in_trait
#6173
Labels
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
M-io
Module: tokio/io
Is your feature request related to a problem? Please describe.
AFIT will be stable in 1.75 rust-lang/rust#115822. I think this allows for simplification of some of the traits in
tokio::io
and elsewhere.Describe the solution you'd like
E.g.
AsyncRead::poll_read
should be able to have anaync fn
signature and returnResult<usize>
, rather than takingcx
and returning aPoll
.This will make it easier for users to make use of the trait directly, as opposed to going through other
tokio
function calls.Describe alternatives you've considered
I do not know what the exact signatures would look like. This would of course be a MSRV breaking change so it may need a feature flag.
The text was updated successfully, but these errors were encountered: