Crates.io | deque_cell |
lib.rs | deque_cell |
version | 0.1.0 |
source | src |
created_at | 2015-08-18 22:47:36.383527 |
updated_at | 2015-12-11 23:58:31.338387 |
description | Provides an efficient wrapper around VecDeque, enabling safe internal mutability without the overhead of RefCell's runtime checks. |
homepage | https://github.com/Diggsey/deque_cell |
repository | https://github.com/Diggsey/deque_cell |
max_upload_size | |
id | 2871 |
size | 2,326 |
Provides an efficient wrapper around VecDeque, enabling safe internal mutability without the overhead of RefCell's runtime checks.
Method names match those of VecDeque, but mutating methods take &self
rather than &mut self
.
Safety is preserved by disallowing internal references to the VecDeque.
DequeCell<T>
can be used to store a queue of actions to perform when mutable access to a resource is possible.
When mutable access is gained, each action can be popped from the queue and executed, with exclusive access to the
resource. Due to the internal mutability of the queue, these actions can themselves push additional actions onto the queue.