#cross-platform #cache #static

reference-counted-singleton

Reference-counted singleton whose protected data can be recreated as needed

6 releases

0.1.5 Sep 13, 2024
0.1.4 Mar 27, 2024
0.1.3 Jan 8, 2024
0.1.2 Sep 3, 2022
0.1.0 Jun 9, 2021

#68 in FFI

Download history 6187/week @ 2024-11-30 3052/week @ 2024-12-07 4562/week @ 2024-12-14 3675/week @ 2024-12-21 6098/week @ 2024-12-28 5727/week @ 2025-01-04 6427/week @ 2025-01-11 6700/week @ 2025-01-18 4216/week @ 2025-01-25 6506/week @ 2025-02-01 901/week @ 2025-02-08 651/week @ 2025-02-15 524/week @ 2025-02-22 414/week @ 2025-03-01 406/week @ 2025-03-08 1062/week @ 2025-03-15

2,511 downloads per month

MIT license

16KB
264 lines

crates.io docs.rs license

Reference-Counted Singleton

RefCountedSingleton is a reference-counted singleton whose protected data can be recreated as needed.

The protected data is created when RefCountedSingleton::get_or_init is called. That function returns an RCSRef reference to the singleton.

RCSRef instances can be cloned as needed. The last RCSRef reference drops the data. Calling RefCountedSingleton::get_or_init again recreates the data.

Versioning

This project adheres to Semantic Versioning. The CHANGELOG.md file details notable changes over time.

No runtime deps