diff --git a/src/core/candles.rs b/src/core/candles.rs index dd6a884..f58e0ea 100644 --- a/src/core/candles.rs +++ b/src/core/candles.rs @@ -10,6 +10,7 @@ use crate::core::{Error, ValueType, OHLCV}; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "lowercase"))] +#[non_exhaustive] pub enum Source { /// *Close* part of a candle Close, diff --git a/src/core/errors.rs b/src/core/errors.rs index 2d0d1b4..6848fd9 100644 --- a/src/core/errors.rs +++ b/src/core/errors.rs @@ -1,5 +1,6 @@ /// Crate errors enum #[derive(Debug, Clone)] +#[non_exhaustive] pub enum Error { /// Error parsing string to [`Source`](crate::core::Source) SourceParse(String), diff --git a/src/helpers/methods.rs b/src/helpers/methods.rs index 31733a6..b5f7f9b 100644 --- a/src/helpers/methods.rs +++ b/src/helpers/methods.rs @@ -27,6 +27,7 @@ pub type RegularMethod = #[derive(Debug, Clone, Copy, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "lowercase"))] +#[non_exhaustive] pub enum RegularMethods { /// [Simple Moving Average](crate::methods::SMA) SMA,