[−][src]Struct sma_rs::SMA
#SMA(Simple Moving Average)
use ta_common::traits::Indicator; use sma_rs::SMA; let mut sma = SMA::new(4); assert_eq!(sma.next(4.0), Some(4.0)); assert_eq!(sma.next(5.0), Some(4.5)); assert_eq!(sma.next(6.0), Some(5.0)); assert_eq!(sma.next(6.0), Some(5.25)); assert_eq!(sma.next(6.0), Some(5.75)); assert_eq!(sma.next(6.0), Some(6.0)); assert_eq!(sma.next(2.0), Some(5.0));
Implementations
impl SMA
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SMA
impl Send for SMA
impl Sync for SMA
impl Unpin for SMA
impl UnwindSafe for SMA
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,