1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::{Consumer, Producer, SharedRb};
use core::mem::MaybeUninit;
#[cfg(feature = "alloc")]
use alloc::{sync::Arc, vec::Vec};
pub type StaticRb<T, const N: usize> = SharedRb<T, [MaybeUninit<T>; N]>;
pub type StaticProducer<'a, T, const N: usize> = Producer<T, &'a StaticRb<T, N>>;
pub type StaticConsumer<'a, T, const N: usize> = Consumer<T, &'a StaticRb<T, N>>;
#[cfg(feature = "alloc")]
pub type HeapRb<T> = SharedRb<T, Vec<MaybeUninit<T>>>;
#[cfg(feature = "alloc")]
pub type HeapProducer<T> = Producer<T, Arc<HeapRb<T>>>;
#[cfg(feature = "alloc")]
pub type HeapConsumer<T> = Consumer<T, Arc<HeapRb<T>>>;