Trait ProcessBlockValues

Source
pub trait ProcessBlockValues {
    // Required method
    fn process(
        values: &[CurrencyAmount],
    ) -> Result<CurrencyAmount, &'static str>;
}
Expand description

Trait for processing accumulated currency values within a single block.

This can be anything from median, average, or more complex calculation.

Required Methods§

Source

fn process(values: &[CurrencyAmount]) -> Result<CurrencyAmount, &'static str>

Process the accumulated values and return the result.

In case of an error, return an error message.

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.

Implementors§