Crates.io | rcell |
lib.rs | rcell |
version | 2.0.0 |
source | src |
created_at | 2022-01-23 00:11:11.934565 |
updated_at | 2022-12-08 23:35:44.820386 |
description | A Cell which can hold either an Arc or an Weak smartpointer or be empty |
homepage | |
repository | https://github.com/cehteh/rcell.git |
max_upload_size | |
id | 519410 |
size | 10,520 |
A Wrapper for reference counted cell that can be Strong<T>
, Weak<T>
or Empty
allowing one to
retain values selectively.
To be used when one has to store a reference to some data but if this reference needs to keep it alive or not is to be determined at runtime.
The feature sync which is enabled by default selects std::sync::Arc<T>
and
std::sync::Weak<T>
as rcell::Strong<T>
and rcell::Weak<T>
. When the sync feature is
disabled then the non sync std::rc::Rc<T>
and std::rc::Weak<T>
are selected as
rcell::Strong<T>
and rcell::Weak<T>
.