Trait afxdp::buf_pool::BufPool[][src]

pub trait BufPool<T, U> where
    T: Buf<U>,
    U: Default
{ fn get(&mut self, bufs: &mut Vec<T>, num: usize) -> usize;
fn put(&mut self, bufs: &mut Vec<T>, num: usize) -> usize;
fn put_buf(&mut self, buf: T) -> usize;
fn len(&self) -> usize;
fn is_empty(&self) -> bool; }

BufPool represents a pool of Bufs.

Required methods

fn get(&mut self, bufs: &mut Vec<T>, num: usize) -> usize[src]

Get up to num bufs from the pool.

fn put(&mut self, bufs: &mut Vec<T>, num: usize) -> usize[src]

Add up to num bufs to the pool.

fn put_buf(&mut self, buf: T) -> usize[src]

Add a single buf to the pool.

fn len(&self) -> usize[src]

Get the number of bufs in the pool.

fn is_empty(&self) -> bool[src]

Indicate whether or not the pool is empty.

Loading content...

Implementors

impl<T, U> BufPool<T, U> for BufPoolVec<T, U> where
    T: Buf<U>,
    U: Default
[src]

Loading content...