[][src]Struct futures_intrusive::buffer::ArrayRingBuf

pub struct ArrayRingBuf<T, A> where
    A: AsMut<[T]> + AsRef<[T]> + RealArray<T>, 
{ /* fields omitted */ }

An array-backed Ring Buffer

A is the type of the backing array. The backing array must be a real array. In order to verify this it must satisfy the RealArray constraint. In order to create a Ring Buffer backed by an array of 5 integer elements, the following code can be utilized:

use futures_intrusive::buffer::{ArrayRingBuf, RingBuf};

type Buffer5 = ArrayRingBuf<i32, [i32; 5]>;
let buffer = Buffer5::new();

Trait Implementations

impl<T, A> RingBuf for ArrayRingBuf<T, A> where
    A: AsMut<[T]> + AsRef<[T]> + RealArray<T>, 
[src]

type Item = T

The type of stored items inside the Ring Buffer

impl<T, A> Drop for ArrayRingBuf<T, A> where
    A: AsMut<[T]> + AsRef<[T]> + RealArray<T>, 
[src]

impl<T, A> Debug for ArrayRingBuf<T, A> where
    A: AsMut<[T]> + AsRef<[T]> + RealArray<T>, 
[src]

Auto Trait Implementations

impl<T, A> Unpin for ArrayRingBuf<T, A> where
    A: Unpin,
    T: Unpin

impl<T, A> Sync for ArrayRingBuf<T, A> where
    A: Sync,
    T: Sync

impl<T, A> Send for ArrayRingBuf<T, A> where
    A: Send,
    T: Send

impl<T, A> UnwindSafe for ArrayRingBuf<T, A> where
    A: UnwindSafe,
    T: UnwindSafe

impl<T, A> RefUnwindSafe for ArrayRingBuf<T, A> where
    A: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]