async_ringbuf::traits

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

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§

§

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>

Source§

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

Source§

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