use crate::{ConcurrentMutRingBuf, LocalMutRingBuf, StackStorage, UnsafeSyncCell};
#[allow(unused_imports)]
use crate::ProdIter;
pub mod concurrent_rb;
pub mod local_rb;
pub mod ring_buffer_trait;
pub mod alloc_ext;
pub type ConcurrentStackRB<T, const N: usize> = ConcurrentMutRingBuf<StackStorage<T, N>>;
impl<T, const N: usize> ConcurrentStackRB<T, N> {
pub unsafe fn new_zeroed() -> Self {
let v: [UnsafeSyncCell<T>; N] = core::array::from_fn(|_| UnsafeSyncCell::new_zeroed());
Self::_from(StackStorage::from(v))
}
}
pub type LocalStackRB<T, const N: usize> = LocalMutRingBuf<StackStorage<T, N>>;
impl<T, const N: usize> LocalStackRB<T, N> {
pub unsafe fn new_zeroed() -> Self {
let v: [UnsafeSyncCell<T>; N] = core::array::from_fn(|_| UnsafeSyncCell::new_zeroed());
Self::_from(StackStorage::from(v))
}
}