Crate maprc

Source
Expand description

alloc::rc::Rc and alloc::sync::Arc alternatives that allow the smart pointer to refer to just a portion of a reference-counted allocation.

This allows storing a pointer that comes from a reference-counted allocation without having to know the type of the allocation it came from. For example, if you’ve allocated storage for an entire struct then you can derive a pointer to just one of its fields while still keeping the entire allocation live.

Modules§

arc
Thread-safe reference-counting pointers. ‘Arc’ stands for ‘Atomically Reference Counted’.
rc
Single-threaded reference-counting pointers. ‘Rc’ stands for ‘Reference Counted’.