tdx_rs/tdx_model/line/day_line.rs
1use serde::{Deserialize, Serialize};
2
3use crate::tdx_model::data::DailyData;
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6pub struct DayLine {
7 pub data: Vec<DailyData>,
8}
9
10impl DayLine {
11 pub fn new(data: Vec<DailyData>) -> Self {
12 Self { data }
13 }
14
15 pub fn inner(self) -> Vec<DailyData> {
16 self.data
17 }
18
19 pub fn inner_ref(&self) -> &[DailyData] {
20 self.data.as_ref()
21 }
22}