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;
20#[cfg(test)]
21mod tests;
22mod traits;
23
24pub use crate::{
25    atomic::{Atomic, AtomicOption},
26    traits::{Well, WellMut},
27};