Skip to main content

potential_well/
lib.rs

1//! Atomic boxes.
2//!
3//! You can use [`Atomic`] and [`AtomicOption`] to access owned pointers to values atomically,
4//! and determine whether smart pointers have to be stored in the atomic.
5//!
6//! You can also implement your own smart pointer types using the [`Well`] trait.
7#![cfg_attr(not(any(feature = "std", test, doc)), no_std)]
8#![cfg_attr(
9    any(coverage_nightly, feature = "nightly"),
10    feature(coverage_attribute)
11)]
12#![cfg_attr(doc, feature(doc_cfg))]
13#![cfg_attr(doc, doc(auto_cfg))]
14#![cfg_attr(feature = "nightly", feature(trait_alias))]
15
16#[cfg(any(doc, test, feature = "alloc"))]
17extern crate alloc;
18
19mod atomic;
20mod inner;
21#[cfg(test)]
22mod tests;
23mod traits;
24
25pub use crate::{
26    atomic::{Atomic, AtomicOption, PotentialAtomic, PotentialAtomicOption},
27    traits::{
28        AtomicArc, AtomicBox, AtomicOptionArc, AtomicOptionBox, AtomicOptionPinArc,
29        AtomicOptionPinBox, AtomicOptionPinRc, AtomicOptionRc, AtomicPinArc, AtomicPinBox,
30        AtomicPinRc, AtomicRc, Bucket, KineticWell, PotentialWell, StrongWell, StrongWellMut,
31        WeakWell, Well,
32    },
33};