slice_queue/
lib.rs

1//! This library provides `SliceQueue`, a optimized queue for efficient working with (byte-)slices.
2//! It allows you to
3//!  - efficiently push an arbitrary amount of elements to the back by either consuming them or by
4//!    cloning/copying them from a slice (if the type supports the `Clone`/`Copy` trait)
5//!  - communicate and enforce a limit on the amount of elements to store
6//!  - efficiently pop an arbitrary amount of elements from the front (optionally into a slice to
7//!    avoid uneccessary reallocations)
8//!  - access the underlying buffer directly by using (range-)indices
9//!  - dereference the `SliceQueue<T>` by propagating the `deref()`-call to the underlying `Vec<T>`
10//!  - access it using the `io::Read` and `io::Write` traits
11
12mod mem;
13mod queue;
14mod traits;
15
16pub use queue::{ SliceQueue, AutoShrinkMode };
17pub use traits::{ ReadableSliceQueue, WriteableSliceQueue };