Trait async_ringbuf::traits::SplitRef

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§

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

Ref producer type.

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

Ref consumer type.

Required Methods§

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

Perform splitting by reference.

Object Safety§

This trait is not object safe.

Implementors§

§

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

§

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

§

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

§

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

§

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

§

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

source§

impl<S: Storage> SplitRef for AsyncRb<S>

§

type RefProd<'a> = AsyncWrap<&'a AsyncRb<S>, true, false> where Self: 'a

§

type RefCons<'a> = AsyncWrap<&'a AsyncRb<S>, false, true> where Self: 'a