Skip to main content

Module io

Module io 

Available on crate feature std only.

Modules§

peek
rewind
timeout

Structs§

ArrayBuf
A fixed-size, inline (stack) owned read buffer, no heap allocation.
BridgeIo
A bidirectional bridge between two Io objects.
CancelIo
Extension type that can be injected into an I/O stream to cancel it gracefully.
ChainReader
Reader that can be used to chain two readers together.
GracefulIo
An I/O wrapper that stops reading and writing once the cancel future resolves.
HeapReader
Reader for reading from a heap-allocated bytes buffer.
PrefixedIo
a stream which has some data prefixed to be read first prior to any other reading.
Slice
A sub-range view [begin, end) of an owned IoBuf, itself an IoBuf.
StackReader
Reader for reading from a stack buffer
Uninit
A read-target view of a buffer’s writable spare [buf_len, capacity): reading into it appends to the underlying (the view’s offset 0 is the underlying’s buf_len). Created by IoBufMut::uninit; recover the buffer with into_inner.

Enums§

BufSlot
An owned buffer slot

Traits§

AsyncReadOwned
Read bytes into an owned buffer, returning the buffer with the result.
AsyncWriteOwned
Write bytes from an owned buffer, returning the buffer with the result.
Io
A generic transport of bytes is a type that implements AsyncRead, AsyncWrite and Send. This is specific to Rama and is directly linked to the supertraits of Tokio.
IoBuf
An owned, stable byte buffer that can back an IO read or write.
IoBufMut
An IoBuf that can also be written into (i.e. used as a read destination).
PeekIoProvider
A higher level trait that can be used by services which wish to peek into I/O, often as part of Deep Protocol Inspections (DPI).
SetLen
Declare how many leading bytes of a buffer are initialized.
SplitIo
Split an IO into owned read and write halves usable concurrently.

Functions§

discard
Read and discard exactly n bytes from reader.

Type Aliases§

BufResult
Result of an owned-buffer IO operation: the io::Result plus the buffer handed back to the caller (ownership round-trips through the operation).