Trait netio::ReadExt [] [src]

pub trait ReadExt: Read {
    fn buffer(self) -> BufReader<Self> where Self: Sized { ... }
    fn retry(self) -> RetryReader<Self> where Self: Sized { ... }
}

Extension methods for std::io::Read

This trait is automatically implemented for all types that implement std::io::Read.

Provided Methods

fn buffer(self) -> BufReader<Self> where Self: Sized

Creates a buffered reader with default capacity

Please see the documentation of BufReader for more details

fn retry(self) -> RetryReader<Self> where Self: Sized

Transforms this reader into a reader that automatically retries on interrupts

The returned adapter will behave identically to the original reader, except that it retries the reading operation automatically if an error of kind ErrorKind::Interrupted occurs.

Note

Methods that are already expected to retry are forwarded directly to the underlying reader.

Implementors