Skip to main content

PriceIterable

Trait PriceIterable 

Source
pub trait PriceIterable {
    type Item: OHLCV;

    // Required method
    fn to_vec(&self) -> impl Iterator<Item = &Self::Item> + '_;

    // Provided methods
    fn closes(&self) -> impl Iterator<Item = f64> + '_ { ... }
    fn opens(&self) -> impl Iterator<Item = f64> + '_ { ... }
    fn highs(&self) -> impl Iterator<Item = f64> + '_ { ... }
    fn lows(&self) -> impl Iterator<Item = f64> + '_ { ... }
    fn volumes(&self) -> impl Iterator<Item = f64> + '_ { ... }
    fn datetimes(&self) -> impl Iterator<Item = DateTime<Utc>> + '_ { ... }
    fn timestamps(&self) -> impl Iterator<Item = i64> + '_ { ... }
}

Required Associated Types§

Required Methods§

Source

fn to_vec(&self) -> impl Iterator<Item = &Self::Item> + '_

Provided Methods§

Source

fn closes(&self) -> impl Iterator<Item = f64> + '_

Source

fn opens(&self) -> impl Iterator<Item = f64> + '_

Source

fn highs(&self) -> impl Iterator<Item = f64> + '_

Source

fn lows(&self) -> impl Iterator<Item = f64> + '_

Source

fn volumes(&self) -> impl Iterator<Item = f64> + '_

Source

fn datetimes(&self) -> impl Iterator<Item = DateTime<Utc>> + '_

Source

fn timestamps(&self) -> impl Iterator<Item = i64> + '_

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl PriceIterable for Vec<DataPoint>

Source§

type Item = DataPoint

Source§

fn to_vec(&self) -> impl Iterator<Item = &Self::Item> + '_

Implementors§