//! Struct definitions for the professions API endpoint. //! //! * [Example](https://api.guildwars2.com/v2/professions/Engineer) //! * [Wiki](https://wiki.guildwars2.com/wiki/API:2/professions) use super::HasId; use serde::{Deserialize, Serialize}; #[derive(Deserialize, Serialize, Debug, Clone)] pub struct Profession { /// The profession id. pub id: String, /// The name of the profession. pub name: String, /// List of specialization ids. pub specializations: Vec, /// List of skills. pub skills: Vec, } impl HasId for Profession { type Id = String; fn get_id(&self) -> String { self.id.clone() } } #[derive(Deserialize, Serialize, Debug, Clone)] pub struct Skill { /// The id of the skill. pub id: u32, /// The skill bar slot that this skill can be used in. pub slot: String, #[serde(rename = "type")] pub typ: String, }