ringbuf::rb

Trait RbRef

Source
pub unsafe trait RbRef: Clone + AsRef<Self::Rb> {
    type Rb: RingBuffer + ?Sized;

    // Provided method
    fn rb(&self) -> &Self::Rb { ... }
}
Expand description

Abstract pointer to the owning ring buffer.

§Safety

Implementation must be fair (e.g. not replacing pointers between calls and so on).

Required Associated Types§

Source

type Rb: RingBuffer + ?Sized

Underlying ring buffer.

Provided Methods§

Source

fn rb(&self) -> &Self::Rb

Get ring buffer 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.

Implementations on Foreign Types§

Source§

impl<'a, B: RingBuffer + AsRef<B> + ?Sized> RbRef for &'a B

Source§

type Rb = B

Source§

impl<B: RingBuffer + ?Sized> RbRef for Rc<B>

Source§

type Rb = B

Source§

impl<B: RingBuffer + ?Sized> RbRef for Arc<B>

Source§

type Rb = B

Implementors§