Skip to main content

UpdateFunction

Trait UpdateFunction 

Source
pub trait UpdateFunction<Input, Output> {
    // Required method
    fn update(&self, current: &Output, input: &Input) -> Output;
}
Expand description

Generic update function: how something evolves over time.

Parameterized over the input stimulus and the output type it transforms.

Required Methods§

Source

fn update(&self, current: &Output, input: &Input) -> Output

Computes the next value given the current value and an input.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§