pub trait ViewProcess<X, Y = X> {
// Required method
fn process_view(&mut self, x: X, y: Y);
}Expand description
Explicit processing API over typed views.
This is the typed-view companion to crate::Process. It is primarily
useful for processors that care about view layout rather than just slice
length.
§Examples
use dsp_process::{Offset, Split, View, ViewMut, ViewProcess};
let mut p = Split::stateless(Offset(3));
let x = View::from_frames(&[[1, 2], [3, 4]]);
let mut y = [[0; 2]; 2];
let yv = ViewMut::from_frames(&mut y);
ViewProcess::process_view(&mut p, x, yv);
assert_eq!(y, [[4, 5], [6, 7]]);Required Methods§
Sourcefn process_view(&mut self, x: X, y: Y)
fn process_view(&mut self, x: X, y: Y)
Process one typed input view into one typed output view.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".