rusty_talib/
lib.rs

1
2use std::error::Error;
3use std::fmt;
4
5
6#[cfg(feature = "overlap_studies")]
7mod overlap_studies;
8pub use overlap_studies::{moving_average,exponential_moving_average};
9
10
11
12
13
14///
15/// error handle
16///
17#[derive(Debug)]
18pub struct ErrorMsg(pub String);
19
20impl fmt::Display for ErrorMsg {
21    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
22        write!(f, "{}", self.0)
23    }
24}
25
26impl Error for ErrorMsg {}