Trait basic_dsp_vector::ToSlice [−][src]
pub trait ToSlice<T> {
fn to_slice(&self) -> &[T];
fn len(&self) -> usize;
fn is_empty(&self) -> bool;
fn alloc_len(&self) -> usize;
fn try_resize(&mut self, len: usize) -> VoidResult;
}Expand description
A trait to convert a type into a slice.
Required methods
Gets the allocated length of a storage.
It’s expected that self.alloc_len() >= self.len()
in all cases.
fn try_resize(&mut self, len: usize) -> VoidResult[src]
fn try_resize(&mut self, len: usize) -> VoidResult[src]Resizes the storage to support at least len elements or
returns an error if resizing isn’t supported.