Skip to main content

SplitRef

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S: Storage, X: Semaphore> SplitRef for BlockingRb<S, X>

Source§

type RefProd<'a> = BlockingWrap<&'a BlockingRb<S, X>, true, false> where Self: 'a

Source§

type RefCons<'a> = BlockingWrap<&'a BlockingRb<S, X>, false, true> where Self: 'a

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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