Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgaebel/iobuf
A contiguous region of bytes, useful for I/O operations.
https://github.com/cgaebel/iobuf
Last synced: 20 days ago
JSON representation
A contiguous region of bytes, useful for I/O operations.
- Host: GitHub
- URL: https://github.com/cgaebel/iobuf
- Owner: cgaebel
- License: mit
- Created: 2014-09-03T03:32:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-15T18:25:42.000Z (over 4 years ago)
- Last Synced: 2024-10-13T02:50:27.947Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 948 KB
- Stars: 33
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Iobuf
=====A contiguous region of bytes, useful for I/O operations.
[![crates.io](https://img.shields.io/crates/v/iobuf.svg)](https://crates.io/crates/iobuf/)
[![Build Status](https://travis-ci.org/cgaebel/iobuf.svg?branch=master)](https://travis-ci.org/cgaebel/iobuf)
An Iobuf consists of:
- a buffer
- limits (a subrange of the buffer)
- a window (a subrange of the limits)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](https://github.com/janestreet/core/blob/master/lib/iobuf.mli) module,
but has evolved into much more.Documentation
-------------See the very thorough [API Docs](https://cgaebel.github.io/iobuf/).