io-buffer 1.0.7

A buffer abstracted for disk and network IO, with static lifetime. Unify Vec and *libc::c_void into one type, with smallest mem footprint.
Documentation

io-buffer

Build Status Cargo Documentation Rust 1.36+

This crate provide a 16 Bytes [Buffer] type, to unify the difference of different types of buffer, for disk and network IO:

On debug mode, provides runtime checking if you try to as_mut() a const buffer.

Usage

Cargo.toml:

[dependencies]
io-buffer = "1"

Feature flags

  • compress: enable [Compression] trait

  • lz4: enable lz4 compression

  • rand: enable rand_buffer() function

  • fail: enable fail injection point "alloc_buf" of return buffer allocate with random uninit content