Trait ringbuf::traits::SplitRef

source ·
pub trait SplitRef {
    type RefProd<'a>: Producer + 'a
       where Self: 'a;
    type RefCons<'a>: Consumer + 'a
       where Self: 'a;

    // Required method
    fn split_ref(&mut self) -> (Self::RefProd<'_>, Self::RefCons<'_>);
}
Expand description

Split the ring buffer by reference onto producer and consumer.

Required Associated Types§

source

type RefProd<'a>: Producer + 'a where Self: 'a

Ref producer type.

source

type RefCons<'a>: Consumer + 'a where Self: 'a

Ref consumer type.

Required Methods§

source

fn split_ref(&mut self) -> (Self::RefProd<'_>, Self::RefCons<'_>)

Perform splitting by reference.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<S: Storage + ?Sized> SplitRef for LocalRb<S>

§

type RefProd<'a> = Direct<&'a LocalRb<S>, true, false> where Self: 'a

§

type RefCons<'a> = Direct<&'a LocalRb<S>, false, true> where Self: 'a

source§

impl<S: Storage + ?Sized> SplitRef for SharedRb<S>

§

type RefProd<'a> = Caching<&'a SharedRb<S>, true, false> where Self: 'a

§

type RefCons<'a> = Caching<&'a SharedRb<S>, false, true> where Self: 'a