pub trait Sink<T, const BUF_SIZE: usize>: Node<T, BUF_SIZE>where
T: Transcendental,{
// Required method
fn consume(
&mut self,
clock: &ClockTick,
signal_inputs: &[&[T; BUF_SIZE]],
control_inputs: &[T],
clock_inputs: &[ClockTick],
feedback_inputs: &[&[T; BUF_SIZE]],
) -> Result<(), ProcessError>;
}Expand description
Active sink of signals
Sinks consume signal and send it to external destinations. They have no signal outputs, but may have control and clock ports.
Required Methods§
Sourcefn consume(
&mut self,
clock: &ClockTick,
signal_inputs: &[&[T; BUF_SIZE]],
control_inputs: &[T],
clock_inputs: &[ClockTick],
feedback_inputs: &[&[T; BUF_SIZE]],
) -> Result<(), ProcessError>
fn consume( &mut self, clock: &ClockTick, signal_inputs: &[&[T; BUF_SIZE]], control_inputs: &[T], clock_inputs: &[ClockTick], feedback_inputs: &[&[T; BUF_SIZE]], ) -> Result<(), ProcessError>
Consume a block of signal
§Arguments
clock- Current clock ticksignal_inputs- Signal input buffers (one per signal input)control_inputs- Control signal values (one per control input)clock_inputs- Clock signal values (one per clock input)feedback_inputs- Feedback values from previous blocks
Trait Implementations§
Source§impl<T, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for Box<dyn Sink<T, BUF_SIZE>>where
T: Transcendental,
impl<T, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for Box<dyn Sink<T, BUF_SIZE>>where
T: Transcendental,
Source§fn process_block(
&mut self,
ctx: &mut ProcessContext<'_>,
) -> Result<(), ProcessError>
fn process_block( &mut self, ctx: &mut ProcessContext<'_>, ) -> Result<(), ProcessError>
Process one block of signal samples. Read more
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".