reference-counted-singleton

Crates.ioreference-counted-singleton
lib.rsreference-counted-singleton
version0.1.4
sourcesrc
created_at2021-06-09 05:47:07.352837
updated_at2024-03-27 19:04:15.92816
descriptionReference-counted singleton whose protected data can be recreated as needed
homepagehttps://codeberg.org/koutheir/reference-counted-singleton.git
repositoryhttps://codeberg.org/koutheir/reference-counted-singleton.git
max_upload_size
id408051
size18,733
Koutheir Attouchi (koutheir)

documentation

https://docs.rs/reference-counted-singleton

README

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.

Commit count: 0

cargo fmt