sync-unsafe-cell 0.1.1

A backport of the SyncUnsafeCell standard library type for use in older Rust versions
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 15.76 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 819.73 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Hawk777/sync-unsafe-cell
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Hawk777

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 stably const, so SyncUnsafeCell::into_inner is also not const.
  • const_mut_refs is not stable, so SyncUnsafeCell::get_mut is not const.
  • CoerceUnsized is not stable, so SyncUnsafeCell does not implement it.

Thanks to Mara Bos (m-ou-se) for the standard library implementation of which this is a copy.