[][src]Struct futures_intrusive::buffer::ArrayBuf

pub struct ArrayBuf<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::{ArrayBuf, RingBuf};

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

Trait Implementations

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

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

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

type Item = T

The type of stored items inside the Ring Buffer

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.