[][src]Trait yata::core::Sequence

pub trait Sequence<T>: AsRef<[T]> {
    pub fn validate(&self) -> bool;
pub fn call<'a, M>(&self, method: M) -> Vec<M::Output>
    where
        M: Method<'a, Input = T> + BorrowMut<M> + 'a
; pub fn apply<'a, M>(&'a mut self, method: M)
    where
        M: Method<'a, Input = T, Output = T> + BorrowMut<M> + 'a,
        Self: AsMut<[T]>,
        T: Copy
, { ... }
pub fn get_initial_value(&self) -> Option<&T> { ... }
pub fn collapse_timeframe(
        &self,
        size: usize,
        continuous: bool
    ) -> Vec<Candle>
    where
        T: OHLCV
, { ... } }

Implements some methods for sequence manipulations.

Required methods

pub fn validate(&self) -> bool[src]

Validates the sequence.

pub fn call<'a, M>(&self, method: M) -> Vec<M::Output> where
    M: Method<'a, Input = T> + BorrowMut<M> + 'a, 
[src]

Calls Method over the slice and returns Vec of result values.

Loading content...

Provided methods

pub fn apply<'a, M>(&'a mut self, method: M) where
    M: Method<'a, Input = T, Output = T> + BorrowMut<M> + 'a,
    Self: AsMut<[T]>,
    T: Copy
[src]

Applies Method on the slice in-place.

pub fn get_initial_value(&self) -> Option<&T>[src]

Returns a reference to the first value in the sequence or None if it's empty.

pub fn collapse_timeframe(&self, size: usize, continuous: bool) -> Vec<Candle> where
    T: OHLCV
[src]

Converts timeframe of the series

Loading content...

Implementors

impl<Q: AsRef<[ValueType]>> Sequence<f64> for Q[src]

impl<T: OHLCV + Clone, Q: AsRef<[T]>> Sequence<T> for Q[src]

Loading content...