Module futures_util::io [−][src]
Asynchronous I/O.
This module is the asynchronous version of std::io
. It defines four
traits, AsyncRead
, AsyncWrite
, AsyncSeek
, and AsyncBufRead
,
which mirror the Read
, Write
, Seek
, and BufRead
traits of the
standard library. However, these traits integrate with the asynchronous
task system, so that if an I/O object isn’t ready for reading (or writing),
the thread is not blocked, and instead the current task is queued to be
woken when I/O is ready.
In addition, the AsyncReadExt
, AsyncWriteExt
, AsyncSeekExt
, and
AsyncBufReadExt
extension traits offer a variety of useful combinators
for operating with asynchronous I/O objects, including ways to work with
them using futures, streams and sinks.
This module is only available when the std
feature of this
library is activated, and it is activated by default.
Structs
AllowStdIo | A simple wrapper type which allows types which implement only
implement |
BufReader | The |
BufWriter | Wraps a writer and buffers its output. |
Chain | Reader for the |
Close | Future for the |
Copy | Future for the |
CopyBuf | Future for the |
Cursor | A |
Empty | Reader for the |
Error | The error type for I/O operations of the |
FillBuf | Future for the |
Flush | Future for the |
IntoSink | Sink for the |
IoSlice | A buffer type used with |
IoSliceMut | A buffer type used with |
Lines | Stream for the |
Read | Future for the |
ReadExact | Future for the |
ReadHalf | The readable half of an object returned from |
ReadLine | Future for the |
ReadToEnd | Future for the |
ReadToString | Future for the |
ReadUntil | Future for the |
ReadVectored | Future for the |
Repeat | Reader for the |
ReuniteError | Error indicating a |
Seek | Future for the |
Sink | Writer for the |
Take | Reader for the |
Window | A owned window around an underlying buffer. |
Write | Future for the |
WriteAll | Future for the |
WriteHalf | The writable half of an object returned from |
WriteVectored | Future for the |
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 |
AsyncRead | Read bytes asynchronously. |
AsyncReadExt | An extension trait which adds utility methods to |
AsyncSeek | Seek bytes asynchronously. |
AsyncSeekExt | An extension trait which adds utility methods to |
AsyncWrite | Write bytes asynchronously. |
AsyncWriteExt | An extension trait which adds utility methods to |
Functions
copy | Creates a future which copies all the bytes from one object to another. |
copy_buf | Creates a future which copies all the bytes from one object to another. |
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 |