#smart-pointers #reference-counting #allocation

maprc

Rc and Arc alternatives that allow the smart pointer to refer to just a portion of a reference-counted allocation

5 releases (3 breaking)

0.4.0 Sep 3, 2024
0.3.1 Aug 30, 2024
0.3.0 Aug 30, 2024
0.2.0 Aug 25, 2024
0.1.0 Aug 25, 2024

#20 in #smart-pointers

Download history 438/week @ 2024-08-24 177/week @ 2024-08-31 14/week @ 2024-09-07 24/week @ 2024-09-14 6/week @ 2024-09-21 3/week @ 2024-09-28 1/week @ 2024-10-05 1/week @ 2024-10-12

251 downloads per month

Custom license

32KB
537 lines

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.

No runtime deps

Features