Trait io::TryRead[][src]

pub trait TryRead<T: Copy> {
    type Err;
    fn try_read(
        &mut self,
        buf: &mut [T]
    ) -> Result<Result<usize, EndOfFile>, Self::Err> { ... }
fn try_readv(
        &mut self,
        bufs: &mut [&mut [T]]
    ) -> Result<Result<usize, EndOfFile>, Self::Err> { ... } }

Associated Types

Provided Methods

r.try_read(buf) = r.try_readv(&mut [buf])

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.

Implementors