[−][src]Trait io::TryRead
Associated Types
type Err
Provided methods
fn try_read(
&mut self,
buf: &mut [T]
) -> Result<Result<usize, EndOfFile>, Self::Err>
&mut self,
buf: &mut [T]
) -> Result<Result<usize, EndOfFile>, Self::Err>
r.try_read(buf) = r.try_readv(&mut [buf])
fn try_readv(
&mut self,
bufs: &mut [&mut [T]]
) -> Result<Result<usize, EndOfFile>, Self::Err>
&mut self,
bufs: &mut [&mut [T]]
) -> Result<Result<usize, EndOfFile>, Self::Err>
Pull some data, at most bufs.fold(0, |n, buf| n+buf.len())
, from this source into given buffers; return how many data were actually read, or a failure.
If no data can be read when called, return 0
rather than wait.