[][src]Trait basic_dsp_vector::Buffer

pub trait Buffer<'a, S, T> where
    S: ToSliceMut<T>,
    T: RealNumber
{ type Borrow: BufferBorrow<S, T>; fn borrow(&'a mut self, len: usize) -> Self::Borrow;
fn alloc_len(&self) -> usize; }

A buffer which can be used by other types. Types will call buffers to create new arrays. A buffer may can implement any buffering strategy.

Associated Types

type Borrow: BufferBorrow<S, T>

The type of the burrow which is returned.

Loading content...

Required methods

fn borrow(&'a mut self, len: usize) -> Self::Borrow

Asks the buffer for new storage of exactly size len. The returned array doesn't need to have be initialized with any default value.

fn alloc_len(&self) -> usize

Returns the allocated length of all storage within this buffer.

Loading content...

Implementors

impl<'a, S, T> Buffer<'a, S, T> for FixedLenBuffer<S, T> where
    S: ToSliceMut<T>,
    T: RealNumber + 'a, 
[src]

type Borrow = FixedLenBufferBurrow<'a, T>

impl<'a, T> Buffer<'a, Vec<T>, T> for NoBuffer where
    T: RealNumber
[src]

type Borrow = NoBufferBurrow<T>

impl<'a, T> Buffer<'a, Vec<T>, T> for SingleBuffer<T> where
    T: RealNumber + 'a, 
[src]

type Borrow = SingleBufferBurrow<'a, T>

Loading content...