pub trait DspSample:
Copy
+ Default
+ PartialEq
+ PartialOrd
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>
+ Neg<Output = Self> {
const ZERO: Self;
const ONE: Self;
// Required methods
fn sat_add(self, rhs: Self) -> Self;
fn sat_sub(self, rhs: Self) -> Self;
fn sat_mul(self, rhs: Self) -> Self;
fn sat_div(self, rhs: Self) -> Self;
fn abs_val(self) -> Self;
fn to_f32(self) -> f32;
fn from_f32(val: f32) -> Self;
}Expand description
Unified numerical sample trait implemented for floating-point sample types.
Enables writing generic filters, delay lines, oscillators, and processing blocks that operate
seamlessly with f32 and f64.
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".