ringbuf::traits

Trait Split

Source
pub trait Split {
    type Prod: Producer;
    type Cons: Consumer;

    // Required method
    fn split(self) -> (Self::Prod, Self::Cons);
}
Expand description

Split the ring buffer onto producer and consumer.

Required Associated Types§

Source

type Prod: Producer

Producer type.

Source

type Cons: Consumer

Consumer type.

Required Methods§

Source

fn split(self) -> (Self::Prod, Self::Cons)

Perform splitting.

Implementations on Foreign Types§

Source§

impl<S: Storage + ?Sized> Split for Box<LocalRb<S>>

Source§

type Prod = Direct<Rc<LocalRb<S>>, true, false>

Source§

type Cons = Direct<Rc<LocalRb<S>>, false, true>

Source§

fn split(self) -> (Self::Prod, Self::Cons)

Source§

impl<S: Storage + ?Sized> Split for Box<SharedRb<S>>

Source§

type Prod = Caching<Arc<SharedRb<S>>, true, false>

Source§

type Cons = Caching<Arc<SharedRb<S>>, false, true>

Source§

fn split(self) -> (Self::Prod, Self::Cons)

Source§

impl<S: Storage + ?Sized> Split for Rc<LocalRb<S>>

Source§

type Prod = Direct<Rc<LocalRb<S>>, true, false>

Source§

type Cons = Direct<Rc<LocalRb<S>>, false, true>

Source§

fn split(self) -> (Self::Prod, Self::Cons)

Source§

impl<S: Storage + ?Sized> Split for Arc<SharedRb<S>>

Source§

type Prod = Caching<Arc<SharedRb<S>>, true, false>

Source§

type Cons = Caching<Arc<SharedRb<S>>, false, true>

Source§

fn split(self) -> (Self::Prod, Self::Cons)

Implementors§

Source§

impl<S: Storage> Split for LocalRb<S>

Source§

type Prod = Direct<Rc<LocalRb<S>>, true, false>

Source§

type Cons = Direct<Rc<LocalRb<S>>, false, true>

Source§

impl<S: Storage> Split for SharedRb<S>

Source§

type Prod = Caching<Arc<SharedRb<S>>, true, false>

Source§

type Cons = Caching<Arc<SharedRb<S>>, false, true>