In the documentation for AsyncReadExt::read_u64
it says it has the same errors as AsyncReadExt::read_exact
, but says nothing about cancellation safety.
The same holds for all the other read_<type>
functions on AsyncReadExt
.
It seems likely that they have the same cancellation safety as read_exact
(that is, none), but is that true?
Is there another way to read the next 4 bytes in a cancel safe way?
There's stuff in Tokio that covers my use case at a higher level, but I'd like to know how I would do this myself.