Trait basic_dsp_vector::Buffer
[−]
[src]
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.
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.
Implementors
impl<'a, S, T> Buffer<'a, S, T> for FixedLenBuffer<S, T> where
S: ToSliceMut<T>,
T: RealNumber + 'a,impl<'a, T> Buffer<'a, Vec<T>, T> for SingleBuffer<T> where
T: RealNumber + 'a,impl<'a, T> Buffer<'a, Vec<T>, T> for NoBuffer where
T: RealNumber,