Skip to main content

mlb_api/requests/meta/
baseball_stats.rs

1use crate::meta::stat_groups::StatGroup;
2use serde::Deserialize;
3
4id!(BaseballStatId { name: String });
5
6#[derive(Debug, Deserialize, Clone)]
7#[serde(rename_all = "camelCase")]
8pub struct BaseballStat {
9	pub lookup_param: Option<String>,
10	pub is_counting: bool,
11	pub label: Option<String>,
12	pub stat_groups: Vec<StatGroup>,
13	#[serde(flatten)]
14	pub id: BaseballStatId,
15}
16
17id_only_eq_impl!(BaseballStat, id);
18meta_kind_impl!("baseballStats" => BaseballStat);
19tiered_request_entry_cache_impl!(BaseballStat.id: BaseballStatId);
20test_impl!(BaseballStat);