[][src]Module futures_util::io

IO

This module contains a number of functions for working with AsyncRead, AsyncWrite, AsyncSeek, and AsyncBufRead types, including the AsyncReadExt, AsyncWriteExt, AsyncSeekExt, and AsyncBufReadExt traits which add methods to the AsyncRead, AsyncWrite, AsyncSeek, and AsyncBufRead types.

This module is only available when the io and std features of this library is activated, and it is activated by default.

Structs

AllowStdIo

A simple wrapper type which allows types which implement only implement std::io::Read or std::io::Write to be used in contexts which expect an AsyncRead or AsyncWrite.

BufReader

The BufReader struct adds buffering to any reader.

BufWriter

Wraps a writer and buffers its output.

Chain

Reader for the chain method.

Close

Future for the close method.

CopyBufInto

Future for the copy_buf_into method.

CopyInto

Future for the copy_into method.

Empty

Reader for the empty() function.

Error

The error type for I/O operations of the Read, Write, Seek, and associated traits.

Flush

Future for the flush method.

IntoSink

Sink for the into_sink method.

IoSlice

A buffer type used with Write::write_vectored.

IoSliceMut

A buffer type used with Read::read_vectored.

InitializerExperimental

A type used to conditionally initialize buffers passed to Read methods.

Lines

Stream for the lines method.

Read

Future for the read method.

ReadExact

Future for the read_exact method.

ReadHalf

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

ReadLine

Future for the read_line method.

ReadToEnd

Future for the read_to_end method.

ReadToString

Future for the read_to_string method.

ReadUntil

Future for the read_until method.

ReadVectored

Future for the read_vectored method.

Repeat

Reader for the repeat() function.

Seek

Future for the seek method.

Sink

Writer for the sink() function.

Take

Reader for the take method.

Window

A owned window around an underlying buffer.

Write

Future for the write method.

WriteAll

Future for the write_all method.

WriteHalf

The writable half of an object returned from AsyncRead::split.

WriteVectored

Future for the write_vectored method.

Enums

ErrorKind

A list specifying general categories of I/O error.

SeekFrom

Enumeration of possible methods to seek within an I/O object.

Traits

AsyncBufRead

Read bytes asynchronously.

AsyncBufReadExt

An extension trait which adds utility methods to AsyncBufRead types.

AsyncRead

Read bytes asynchronously.

AsyncReadExt

An extension trait which adds utility methods to AsyncRead types.

AsyncSeek

Seek bytes asynchronously.

AsyncSeekExt

An extension trait which adds utility methods to AsyncSeek types.

AsyncWrite

Write bytes asynchronously.

AsyncWriteExt

An extension trait which adds utility methods to AsyncWrite types.

Functions

empty

Constructs a new handle to an empty reader.

repeat

Creates an instance of a reader that infinitely repeats one byte.

sink

Creates an instance of a writer which will successfully consume all data.

Type Definitions

Result

A specialized Result type for I/O operations.