2 releases
0.1.1 | Jun 9, 2023 |
---|---|
0.1.0 | May 21, 2022 |
#532 in Concurrency
698 downloads per month
Used in 14 crates
(8 directly)
7KB
This is a backport of the SyncUnsafeCell
type from the standard library. The
backport allows it to be used in older Rust versions, where it either does not
exist yet or is not stable. Its minimum supported Rust version is 1.59, though
it may work with older versions too.
A few changes have been made accordingly:
UnsafeCell::into_inner
is not stablyconst
, soSyncUnsafeCell::into_inner
is also notconst
.const_mut_refs
is not stable, soSyncUnsafeCell::get_mut
is notconst
.CoerceUnsized
is not stable, soSyncUnsafeCell
does not implement it.
Thanks to Mara Bos (m-ou-se) for the standard library implementation of which this is a copy.
lib.rs
:
This is a backport of the SyncUnsafeCell
type from the standard library. The backport allows
it to be used in older Rust versions, where it either does not exist yet or is not stable. Its
minimum supported Rust version is 1.59, though
it may work with older versions too.
A few changes have been made accordingly:
UnsafeCell::into_inner
is not stablyconst
, soSyncUnsafeCell::into_inner
is also notconst
.const_mut_refs
is not stable, soSyncUnsafeCell::get_mut
is notconst
.CoerceUnsized
is not stable, soSyncUnsafeCell
does not implement it.
Thanks to Mara Bos (m-ou-se) for the standard library implementation of which this is a copy.