1pub(crate) mod buffer;
7pub(crate) mod packed;
8pub(crate) mod queue;
9pub(crate) mod slot;
10
11pub use packed::{AsPackedValue, TruncatedU64};
12
13pub mod slots {
14 use super::*;
18 use crate::utils::Sealed;
19
20 cfg_atomic_tagged64! {
21 pub use tagged64::*;
22 mod tagged64 {
23 use super::*;
24 pub struct Tagged64;
27 impl Sealed for Tagged64 {}
28 impl<T: AsPackedValue> SlotType<T> for Tagged64 {
29 type Slot = slot::Tagged64<T>;
30 }
31 }
32 }
33
34 cfg_atomic_tagged128! {
35 pub use tagged128::*;
36 mod tagged128 {
37 use super::*;
38 pub struct Tagged128;
41 impl Sealed for Tagged128 {}
42 impl<T: AsPackedValue> SlotType<T> for Tagged128 {
43 type Slot = slot::Tagged128<T>;
44 }
45
46 }
47 }
48
49 pub struct Auto;
51 impl Sealed for Auto {}
52
53 #[doc(hidden)]
54 pub trait SlotType<T: AsPackedValue>: Sealed {
55 #[allow(private_bounds)]
56 type Slot: slot::Slot<Item = T>;
57 }
58
59 impl<T: AsPackedValue> SlotType<T> for Auto {
60 #[cfg(all(
61 any(target_has_atomic = "64", feature = "atomic-fallback"),
62 not(any(target_has_atomic = "128", feature = "atomic-fallback"))
63 ))]
64 type Slot = slot::Tagged64<T>;
65 #[cfg(any(target_has_atomic = "128", feature = "atomic-fallback"))]
66 type Slot = slot::Tagged128<T>;
67
68 #[cfg(all(
69 not(any(target_has_atomic = "64", feature = "atomic-fallback")),
70 not(target_has_atomic = "128")
71 ))]
72 compile_error!("target arch is currently not supported");
73 }
74}