rust-box 0.17.0

This crate provides an odd set of tools for Rust programming
Documentation

Rust Box

English | 简体中文

Rust Box provides an odd set of tools for Rust programming.

Crates

The main rust-box crate re-exports tools from smaller subcrates:

Crate Description Tests
queue-ext Extended queue: convert pop() to Stream, push() to Sender 41
stream-ext Stream extension trait with rate-limiting combinators 6
task-exec-queue Async task execution queue with concurrency control 53
event Event listener/notification chain 7
std-ext Standard library extensions 62
mpsc MPSC channel based on queue-ext 37
dequemap Double-ended queue with map features, no_std 30
collections BinaryHeap and PriorityQueue wrappers, no_std 18
counter Concurrent counter with rate tracking 51
convert Type conversion utilities (byte size parsing) 8
handy-grpc gRPC client/server with chunked transfer 61

Usage

Add this to your Cargo.toml:

[dependencies]

rust-box = "0.16"

Or use individual crates:

[dependencies]

queue-ext = "0.4"

task-exec-queue = "0.10"

Cargo Feature Flags

The root crate uses feature flags to enable individual subcrates or specific sub-features.

Quick enable

Enable everything at once:

[dependencies]

rust-box = { version = "0.16", features = ["full"] }

Feature table

Feature Enables Default
full All crates and features below no
Individual crates
queue-ext queue-ext crate no
stream-ext stream-ext crate no
task-exec-queue task-exec-queue crate no
event event-notify crate no
std-ext std-ext crate no
mpsc mpsc crate no
dequemap dequemap crate no
handy-grpc handy-grpc crate no
collections box-collections crate no
counter box-counter crate no
convert box-convert crate no
Sub-features
stream-ext-leaky-bucket stream-ext/leaky-bucket no
stream-ext-governor stream-ext/governor no
task-exec-queue-rate task-exec-queue/rate no
mpsc-segqueue mpsc/segqueue yes (via mpsc default)
mpsc-vecdeque mpsc/vecdeque no
mpsc-priority mpsc/priority no
mpsc-indexmap mpsc/indexmap no
dequemap-std dequemap/std yes (via dequemap default)
dequemap-serde dequemap/serde no
dequemap-btreemap dequemap/btreemap yes (via dequemap default)
dequemap-hashmap dequemap/hashmap no
collections-std collections/std yes (via collections default)
collections-serde collections/serde no
collections-binary-heap collections/binary-heap no
collections-priority-queue collections/priority-queue no
handy-grpc-reuse handy-grpc/reuse no
counter-count counter/count no
counter-rate counter/rate no
convert-bytesize convert/bytesize no

Test Status

All crates include comprehensive unit tests. Run with:

cargo test --workspace --all-features

Total: ~340+ tests, all passing.

Examples

License

Licensed under either of

at your option.