#[cfg(feature = "alloc")] use super::storage::Heap; use super::{ rb::SharedRb, storage::Array, wrap::{CachingCons, CachingProd}, }; #[cfg(all(feature = "alloc", not(feature = "portable-atomic")))] pub use alloc::sync::Arc; #[cfg(all(feature = "alloc", feature = "portable-atomic"))] pub use portable_atomic_util::Arc; /// Stack-allocated ring buffer with static capacity. /// /// *Capacity (`N`) must be in `1..=usize::MAX / 2`.* pub type StaticRb = SharedRb>; /// Alias for [`StaticRb`] producer. pub type StaticProd<'a, T, const N: usize> = CachingProd<&'a StaticRb>; /// Alias for [`StaticRb`] consumer. pub type StaticCons<'a, T, const N: usize> = CachingCons<&'a StaticRb>; /// Heap-allocated ring buffer. #[cfg(feature = "alloc")] pub type HeapRb = SharedRb>; #[cfg(feature = "alloc")] /// Alias for [`HeapRb`] producer. pub type HeapProd = CachingProd>>; #[cfg(feature = "alloc")] /// Alias for [`HeapRb`] consumer. pub type HeapCons = CachingCons>>;