[−][src]Struct futures_intrusive::buffer::ArrayBuf
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]
A: AsMut<[T]> + AsRef<[T]> + RealArray<T>,
impl<T, A> Drop for ArrayBuf<T, A> where
A: AsMut<[T]> + AsRef<[T]> + RealArray<T>,
[src]
A: AsMut<[T]> + AsRef<[T]> + RealArray<T>,
impl<T, A> RingBuf for ArrayBuf<T, A> where
A: AsMut<[T]> + AsRef<[T]> + RealArray<T>,
[src]
A: AsMut<[T]> + AsRef<[T]> + RealArray<T>,
type Item = T
The type of stored items inside the Ring Buffer
fn new() -> Self
[src]
fn with_capacity(_cap: usize) -> Self
[src]
fn capacity(&self) -> usize
[src]
fn len(&self) -> usize
[src]
fn can_push(&self) -> bool
[src]
fn push(&mut self, value: Self::Item)
[src]
fn pop(&mut self) -> Self::Item
[src]
fn is_empty(&self) -> bool
[src]
Auto Trait Implementations
impl<T, A> RefUnwindSafe for ArrayBuf<T, A> where
A: RefUnwindSafe,
T: RefUnwindSafe,
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, A> Send for ArrayBuf<T, A> where
A: Send,
T: Send,
A: Send,
T: Send,
impl<T, A> Sync for ArrayBuf<T, A> where
A: Sync,
T: Sync,
A: Sync,
T: Sync,
impl<T, A> Unpin for ArrayBuf<T, A> where
A: Unpin,
T: Unpin,
A: Unpin,
T: Unpin,
impl<T, A> UnwindSafe for ArrayBuf<T, A> where
A: UnwindSafe,
T: UnwindSafe,
A: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,