SignalType

Trait SignalType 

Source
pub trait SignalType:
    Copy
    + Clone
    + Debug
    + PartialEq
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<Output = Self>
    + Div<Output = Self>
    + Default
    + Send
    + Sync {
    // Required methods
    fn zero() -> Self;
    fn one() -> Self;
    fn from_f64(v: f64) -> Self;
    fn to_f64(self) -> f64;
}
Expand description

Trait for numeric types that can be used in signal processing

Required Methods§

Source

fn zero() -> Self

Source

fn one() -> Self

Source

fn from_f64(v: f64) -> Self

Source

fn to_f64(self) -> f64

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SignalType for f32

Source§

fn zero() -> Self

Source§

fn one() -> Self

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

impl SignalType for f64

Source§

fn zero() -> Self

Source§

fn one() -> Self

Source§

fn from_f64(v: f64) -> Self

Source§

fn to_f64(self) -> f64

Implementors§