Crate netio [] [src]

Alternative implementation of many functions found in std::io, but suitable for blocking IO over networks.

The main reason for this crate is the handling of ErrorKind::Interrupted in std::io. Except for Read::read() and Write::write(), almost all functions will ignore interrupts and just retry.

This crate provides alternative implementations using a similar API but allow for interrupts whithout losing any content.

Most functions are based on BufRead instead of Read to ensure that no content is lost on retry.

Structs

Bytes

An iterator over u8 values of a reader.

Chars

An iterator over the chars of a reader.

Collect

A reader adapter over an iterator of readers

Repeat

An adapter that restarts from the beginning after EOF is reached

Retry

An adapter that retries reading operations of the underlying reader

Split

An iterator over the contents of an instance of BufRead split on a particular byte.

Take

Reader adaptor which limits the bytes read from an underlying reader.

Traits

BufReadExt

Extension methods for std::io::BufRead

BufReadGrow

A BufReadGrow is a BufReader that has the ability to read additional data even if the buffer is not empty.

ReadExt

Extension methods for std::io::Read

WriteExt

Extension methods for std::io::Write

Functions

copy

Copies the entire content of a buffered reader into a writer.

copy_until

Copies the content of a buffered reader into a writer until a delimiter is reached.