stock-trek 0.5.0

Stock Trek time-series analysis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct TradingPair {
    pub base: String,
    pub quote: String,
}

impl TradingPair {
    pub fn new(base: impl AsRef<str>, quote: impl AsRef<str>) -> Self {
        Self {
            base: base.as_ref().to_string(),
            quote: quote.as_ref().to_string(),
        }
    }
}