oneringbuf 0.8.0

A lock-free single-producer, single-consumer (SPSC) ring buffer with in-place mutability, asynchronous support, and virtual memory optimisation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::ops::Deref;

pub mod droppable;
pub mod non_droppable;

pub(crate) trait BufRef: Deref<Target = Self::Buffer> + Clone {
    type Buffer;
}

/// One of the traits implemented by ring buffers; useful only as a type-restrictor in signatures.
/// `TargetRef` indicates which ref should be used to handle the inner buffer.
pub trait IntoRef {
    type TargetRef: BufRef<Buffer = Self>;
}