ringbuf icon indicating copy to clipboard operation
ringbuf copied to clipboard

LocalRb Producer type alias?

Open dcvz opened this issue 2 years ago • 1 comments

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

dcvz avatar Mar 09 '23 13:03 dcvz

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]>>

agerasev avatar Mar 10 '23 03:03 agerasev