Skip to main content

mlb_api/requests/meta/
platforms.rs

1use serde::Deserialize;
2
3id!(#[doc = "A [`String`] representing an electronic platform"] PlatformId { platformCode: String });
4
5/// A detailed `struct` representing a Platform
6///
7/// ## Examples
8/// Platform {
9///     name: "iOS Phone".into(),
10///     id: "ios-phone".into(),
11/// }
12#[derive(Debug, Deserialize, Clone)]
13pub struct Platform {
14	#[serde(rename = "platformDescription")]
15	pub name: String,
16	#[serde(flatten)]
17	pub id: PlatformId,
18}
19
20id_only_eq_impl!(Platform, id);
21meta_kind_impl!("platforms" => Platform);
22tiered_request_entry_cache_impl!(Platform.id: PlatformId);
23test_impl!(Platform);