Crates.io | iobuf |
lib.rs | iobuf |
version | 5.8.1 |
source | src |
created_at | 2014-11-20 23:50:09.735498 |
updated_at | 2017-07-23 21:50:57.648181 |
description | A contiguous region of bytes, useful for I/O operations. |
homepage | https://github.com/cgaebel/iobuf |
repository | https://github.com/cgaebel/iobuf |
max_upload_size | |
id | 186 |
size | 184,824 |
A contiguous region of bytes, useful for I/O operations.
An Iobuf consists of:
All iobuf operations are restricted to operate within the limits. Initially,
the window of an Iobuf is identical to the limits. If you have an &mut
to
an Iobuf, you may change the window and limits. If you only have a &
, you
may not. Similarly, if you have a RWIobuf
, you may modify the data in the
buffer. If you have a ROIobuf
, you may not.
The limits can be narrow
ed, but never widened. The window may be set to
any arbitrary subrange of the limits.
Iobufs are cheap to clone
, since the buffers are refcounted. Use this to
construct multiple views into the same data.
This started out as a direct port of Jane Street Core's Iobuf module, but has evolved into much more.
See the very thorough API Docs.