Skip to main content

EvalIndicator

Trait EvalIndicator 

Source
pub trait EvalIndicator: Send + Sync {
    // Required methods
    fn update(&mut self, input: &BarInput<'_>) -> Option<f64>;
    fn fields(&self) -> Vec<(&'static str, f64)>;
    fn warmup(&self) -> usize;
}
Expand description

A uniform, object-safe indicator the engine drives one bar at a time.

Required Methods§

Source

fn update(&mut self, input: &BarInput<'_>) -> Option<f64>

Feed one bar’s BarInput; returns the primary value, or None while warming up or when the required feed is absent.

Source

fn fields(&self) -> Vec<(&'static str, f64)>

Named output fields of the most recent update (empty for single-output).

Source

fn warmup(&self) -> usize

Number of bars required before the first value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§