iBag - Thread-safe Immutable Bag
A Rust library providing a thread-safe, immutable bag container that allows safe concurrent access to shared data.
Features
- Thread-safe immutable container
- Read and write operations with automatic locking
- Closure-based access patterns
- Automatic Clone, Send and Sync implementations
Installation
Add this to your Cargo.toml:
[]
= "0.2.0"
Usage
use iBag;
// Create a new iBag
let bag = new;
// Read access
let value = bag.with_read;
assert_eq!;
// Write access
bag.with;
// Thread-safe operations
let bag = new;
let handles: = .map.collect;
for handle in handles
API Documentation
See the API documentation for complete details.
License
MIT