#[non_exhaustive]pub enum MA {
Show 15 variants
SMA(PeriodType),
WMA(PeriodType),
HMA(PeriodType),
RMA(PeriodType),
EMA(PeriodType),
DMA(PeriodType),
DEMA(PeriodType),
TMA(PeriodType),
TEMA(PeriodType),
WSMA(PeriodType),
SMM(PeriodType),
SWMA(PeriodType),
TRIMA(PeriodType),
LinReg(PeriodType),
Vidya(PeriodType),
}
Expand description
Default moving average constructor
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SMA(PeriodType)
WMA(PeriodType)
HMA(PeriodType)
RMA(PeriodType)
EMA(PeriodType)
DMA(PeriodType)
DEMA(PeriodType)
Another type of Double Exponential Moving Average
TMA(PeriodType)
TEMA(PeriodType)
Another type of Triple Exponential Moving Average
WSMA(PeriodType)
SMM(PeriodType)
SWMA(PeriodType)
TRIMA(PeriodType)
LinReg(PeriodType)
Vidya(PeriodType)
Trait Implementations§
source§impl<'de> Deserialize<'de> for MA
impl<'de> Deserialize<'de> for MA
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl MovingAverageConstructor for MA
impl MovingAverageConstructor for MA
§type Instance = MAInstance
type Instance = MAInstance
MovingAverage
Instance typesource§fn init(&self, value: ValueType) -> Result<Self::Instance, Error>
fn init(&self, value: ValueType) -> Result<Self::Instance, Error>
Creates moving average instance with the
initial_value
source§fn ma_period(&self) -> PeriodType
fn ma_period(&self) -> PeriodType
Returns period length of
source§fn is_similar_to(&self, other: &Self) -> bool
fn is_similar_to(&self, other: &Self) -> bool
Checks two moving average constructors for the same moving average type
impl Copy for MA
impl Eq for MA
impl StructuralPartialEq for MA
Auto Trait Implementations§
impl RefUnwindSafe for MA
impl Send for MA
impl Sync for MA
impl Unpin for MA
impl UnwindSafe for MA
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more