Crates.io | reference-counted-singleton |
lib.rs | reference-counted-singleton |
version | 0.1.5 |
source | src |
created_at | 2021-06-09 05:47:07.352837 |
updated_at | 2024-09-13 02:04:57.064765 |
description | Reference-counted singleton whose protected data can be recreated as needed |
homepage | https://codeberg.org/koutheir/reference-counted-singleton.git |
repository | https://codeberg.org/koutheir/reference-counted-singleton.git |
max_upload_size | |
id | 408051 |
size | 18,962 |
[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.
This project adheres to Semantic Versioning.
The CHANGELOG.md
file details notable changes over time.