Skip to main content

vndb_api/format/
producer.rs

1use crate::format::schema::Language;
2use serde::{Deserialize, Serialize};
3
4#[derive(Deserialize, Serialize, Debug)]
5pub struct Producer {
6    /// Vndbid
7    pub id: Option<String>,
8    pub name: Option<String>,
9    pub aliases: Option<Vec<String>>,
10    /// Primary langauge
11    pub lang: Option<Language>,
12    pub r#type: Option<ProducerType>,
13    /// May contain formatting codes
14    pub description: Option<String>,
15}
16
17#[derive(Deserialize, Serialize, Debug)]
18#[serde(rename_all = "lowercase")]
19pub enum ProducerType {
20    #[serde(rename = "co")]
21    Company,
22    #[serde(rename = "in")]
23    Individual,
24    #[serde(rename = "ng")]
25    AmateurGroup,
26}