pub trait ReadAsync<'a, T, FRead, FReadExact>{
// Required methods
fn read(&'a mut self, bytes: &'a mut [u8]) -> FRead;
fn read_exact(&'a mut self, bytes: &'a mut [u8]) -> FReadExact;
}
Expand description
Trait that adds async variants of some std::io::Read functions.
Required Methods§
Sourcefn read_exact(&'a mut self, bytes: &'a mut [u8]) -> FReadExact
fn read_exact(&'a mut self, bytes: &'a mut [u8]) -> FReadExact
Async equivalent to std::io::Read::read_exact. This MAY read more bytes than the length of the array if needed (namely, when using UdpSockets), but will avoid doing so to the best of its ability.