Crate shared_container

Source
Expand description

§Shared Container Module

This module provides a unified abstraction over different container types used for shared data access with interior mutability in different contexts.

It abstracts over the differences between thread-safe Arc<RwLock<T>> used in multi-threaded environments and Rc<RefCell<T>> used in single-threaded environments like WebAssembly.

This allows code using these containers to be written once but work efficiently in both contexts.

Structs§

SharedContainer
A unified container for shared data that works in both multi-threaded and single-threaded environments.
WeakSharedContainer
A weak reference to a SharedContainer.

Enums§

SharedReadGuard
A read-only guard for accessing data in a SharedContainer.
SharedWriteGuard
A writable guard for accessing and modifying data in a SharedContainer.