use thiserror::Error;
#[derive(Debug, Clone, PartialEq, Eq, Error)]
pub enum Error {
#[error("period must be greater than zero")]
PeriodZero,
#[error("invalid period: {message}")]
InvalidPeriod { message: &'static str },
#[error("input value must be finite (got NaN or infinity)")]
NonFiniteInput,
#[error("invalid candle: {message}")]
InvalidCandle { message: &'static str },
#[error("multiplier must be greater than zero")]
NonPositiveMultiplier,
}
pub type Result<T> = core::result::Result<T, Error>;