ringbuf
ringbuf copied to clipboard
LocalRb Producer type alias?
Hi @agerasev ,
Question for you: is there a type alias to use when using a LocalRb for Producer?
HeapRb has HeapProducer but cannot figure out the correct type for a Producer of LocalRb
Hi!
Unfortunately, I haven't created such aliases for LocalRb as it rarely used, in my opinion.
But you can write the full type of local producer by yourself:
- For heap-allocated local producer:
Producer<T, Arc<LocalRb<T, Vec<MaybeUninit<T>>>>> - For static local producer/consumer:
Producer<T, &'a LocalRb<T, [MaybeUninit<T>; N]>>