Module tokio_core::io [] [src]

I/O conveniences when working with primitives in tokio-core

Contains various combinators to work with I/O objects and type definitions as well.

Structs

Copy

A future which will copy all data from a reader into a writer.

Flush

A future used to fully flush an I/O object.

ReadExact

A future which can be used to easily read exactly enough bytes to fill a buffer.

ReadHalf

The readable half of an object returned from Io::split.

ReadToEnd

A future which can be used to easily read the entire contents of a stream into a vector.

Window

A owned window around an underlying buffer.

WriteAll

A future used to write the entire contents of some data to a stream.

WriteHalf

The readable half of an object returned from Io::split.

Traits

FramedIo

A trait for framed reading and writing.

Io

A trait for read/write I/O objects

Functions

copy

Creates a future which represents copying all the bytes from one object to another.

flush

Creates a future which will entirely flush an I/O object and then yield the object itself.

read_exact

Creates a future which will read exactly enough bytes to fill buf, returning an error if EOF is hit sooner.

read_to_end

Creates a future which will read all the bytes associated with the I/O object A into the buffer provided.

write_all

Creates a future that will write the entire contents of the buffer buf to the stream a provided.

Type Definitions

IoFuture

A convenience typedef around a Future whose error component is io::Error

IoStream

A convenience typedef around a Stream whose error component is io::Error