Skip to main content

WdfElement

Trait WdfElement 

Source
pub trait WdfElement<T: Transcendental>: Send + Sync {
    // Required methods
    fn port_resistance(&self) -> T;
    fn process_incident(&mut self, a: T) -> T;
    fn update_state(&mut self);
    fn voltage(&self) -> T;
    fn current(&self) -> T;
    fn reset(&mut self);
}
Expand description

Base WDF element trait.

Every WDF element has a port resistance and processes incident waves to produce reflected waves. For SIMD batch processing, see the process_incident_vector methods on concrete element types.

Required Methods§

Source

fn port_resistance(&self) -> T

Port resistance

Source

fn process_incident(&mut self, a: T) -> T

Process incident wave, return reflected wave

Source

fn update_state(&mut self)

Update internal state (called after wave computation)

Source

fn voltage(&self) -> T

Current voltage across the element

Source

fn current(&self) -> T

Current current through the element

Source

fn reset(&mut self)

Reset to initial state

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§