Module io
Available on crate feature
std only.Modules§
Structs§
- Array
Buf - A fixed-size, inline (stack) owned read buffer, no heap allocation.
- Bridge
Io - A bidirectional bridge between two
Ioobjects. - Cancel
Io - Extension type that can be injected into an I/O stream to cancel it gracefully.
- Chain
Reader - Reader that can be used to chain two readers together.
- Graceful
Io - An I/O wrapper that stops reading and writing once the cancel future resolves.
- Heap
Reader - Reader for reading from a heap-allocated bytes buffer.
- Prefixed
Io - 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 ownedIoBuf, itself anIoBuf. - Stack
Reader - 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’sbuf_len). Created byIoBufMut::uninit; recover the buffer withinto_inner.
Enums§
- BufSlot
- An owned buffer slot
Traits§
- Async
Read Owned - Read bytes into an owned buffer, returning the buffer with the result.
- Async
Write Owned - Write bytes from an owned buffer, returning the buffer with the result.
- Io
- A generic transport of bytes is a type that implements
AsyncRead,AsyncWriteandSend. This is specific to Rama and is directly linked to the supertraits ofTokio. - IoBuf
- An owned, stable byte buffer that can back an IO read or write.
- IoBuf
Mut - An
IoBufthat can also be written into (i.e. used as a read destination). - Peek
IoProvider - 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
nbytes fromreader.
Type Aliases§
- BufResult
- Result of an owned-buffer IO operation: the
io::Resultplus the buffer handed back to the caller (ownership round-trips through the operation).