pub trait Buffer<T> {
// Required methods
fn len(&self) -> usize;
fn as_slice(&self) -> &[T];
fn as_mut_slice(&mut self) -> &mut [T];
fn fill(&mut self, value: T)
where T: Copy;
fn copy_from(&mut self, src: &[T])
where T: Copy;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Common interface for audio buffers of arbitrary size.
Enables storing buffers of different types and sizes in a single graph
resource registry (GraphResources).
Required Methods§
Sourcefn as_mut_slice(&mut self) -> &mut [T]
fn as_mut_slice(&mut self) -> &mut [T]
Mutable access to the buffer data.