Skip to main content

Wrap

Trait Wrap 

Source
pub trait Wrap: AsRef<Self> + AsMut<Self> {
    type RbRef: RbRef;

    // Required methods
    fn rb_ref(&self) -> &Self::RbRef;
    fn into_rb_ref(self) -> Self::RbRef;

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

Ring buffer wrapper that contains reference to the ring buffer inside.

Required Associated Types§

Source

type RbRef: RbRef

Ring buffer reference type.

Required Methods§

Source

fn rb_ref(&self) -> &Self::RbRef

Underlying ring buffer reference.

Source

fn into_rb_ref(self) -> Self::RbRef

Destructure into underlying ring buffer reference.

Provided Methods§

Source

fn rb(&self) -> &<Self::RbRef as RbRef>::Rb

Underlying ring buffer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R: RbRef, const P: bool, const C: bool> Wrap for Caching<R, P, C>

Source§

type RbRef = R

Source§

impl<R: RbRef, const P: bool, const C: bool> Wrap for Direct<R, P, C>

Source§

type RbRef = R

Source§

impl<R: RbRef, const P: bool, const C: bool> Wrap for Frozen<R, P, C>

Source§

type RbRef = R