[][src]Module futures_util::io

This is supported on crate feature io only.

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

AllowStdIoio

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.

BufReaderio

The BufReader struct adds buffering to any reader.

BufWriterio

Wraps a writer and buffers its output.

Chainio

Reader for the chain method.

Closeio

Future for the close method.

Copyio

Future for the copy() function.

CopyBufio

Future for the copy_buf() function.

Cursorio

A Cursor wraps an in-memory buffer and provides it with a AsyncSeek implementation.

Emptyio

Reader for the empty() function.

Errorio

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

FillBufio

Future for the fill_buf method.

Flushio

Future for the flush method.

IntoSinkio and sink

Sink for the into_sink method.

IoSliceio

A buffer type used with Write::write_vectored.

IoSliceMutio

A buffer type used with Read::read_vectored.

InitializerExperimentalio and read-initializer

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

Linesio

Stream for the lines method.

Readio

Future for the read method.

ReadExactio

Future for the read_exact method.

ReadHalfio

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

ReadLineio

Future for the read_line method.

ReadToEndio

Future for the read_to_end method.

ReadToStringio

Future for the read_to_string method.

ReadUntilio

Future for the read_until method.

ReadVectoredio

Future for the read_vectored method.

Repeatio

Reader for the repeat() function.

ReuniteErrorio

Error indicating a ReadHalf<T> and WriteHalf<T> were not two halves of a AsyncRead + AsyncWrite, and thus could not be reunited.

Seekio

Future for the seek method.

Sinkio

Writer for the sink() function.

Takeio

Reader for the take method.

Windowio

A owned window around an underlying buffer.

Writeio

Future for the write method.

WriteAllio

Future for the write_all method.

WriteAllVectoredio

Future for the write_all_vectored method.

WriteHalfio

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

WriteVectoredio

Future for the write_vectored method.

Enums

ErrorKindio

A list specifying general categories of I/O error.

SeekFromio

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

Traits

AsyncBufReadio

Read bytes asynchronously.

AsyncBufReadExtio

An extension trait which adds utility methods to AsyncBufRead types.

AsyncReadio

Read bytes asynchronously.

AsyncReadExtio

An extension trait which adds utility methods to AsyncRead types.

AsyncSeekio

Seek bytes asynchronously.

AsyncSeekExtio

An extension trait which adds utility methods to AsyncSeek types.

AsyncWriteio

Write bytes asynchronously.

AsyncWriteExtio

An extension trait which adds utility methods to AsyncWrite types.

Functions

copyio

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

copy_bufio

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

emptyio

Constructs a new handle to an empty reader.

repeatio

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

sinkio

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

Type Definitions

Resultio

A specialized Result type for I/O operations.