atomic-primitive 0.1.3

Traits for primitive atomic types
Documentation
  • Coverage
  • 100%
    29 out of 29 items documented1 out of 2 items with examples
  • Size
  • Source code size: 69.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.44 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • vigna/atomic-primitive-rs
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vigna

atomic-primitive

crate documentation minimum rustc 1.85 build status

Traits for primitive atomic types in Rust.

These traits provide a simple hierarchy for generic programming with Rust's primitive atomic types:

Additionally, AtomicPrimitive maps non-atomic primitive types to their atomic counterparts, mirroring the unstable core::sync::atomic::AtomicPrimitive trait.

The goal of this crate is to provide the same functionality as the num-primitive crate for atomic types.

It is not a goal of this crate to add any functionality to the atomic types, only to expose what is already available in the standard library in a more generic way, and make a few experimental traits and types available on stable.

The only addition is an AtomicPrimitive bound on PrimitiveAtomic::Value, which enables bidirectional navigation between atomic and non-atomic types. The traits are also sealed against downstream implementations to allow expansion in a non-breaking way.

Compatibility

This crate is currently tested for Rust 1.85 and greater.