ringbuf::traits

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", so this trait is not object safe.

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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