tmdb_api/common/
credits.rs

1use crate::people::PersonShort;
2
3#[derive(Debug, Deserialize, Serialize)]
4pub struct CreditCommon {
5    pub credit_id: String,
6    pub adult: bool,
7    pub known_for_department: Option<String>,
8    pub original_name: String,
9    pub popularity: f64,
10}
11
12#[derive(Debug, Deserialize, Serialize)]
13pub struct Cast {
14    #[serde(flatten)]
15    pub credit: CreditCommon,
16    #[serde(flatten)]
17    pub person: PersonShort,
18    pub cast_id: u64,
19    pub character: String,
20    pub order: u64,
21}
22
23#[derive(Debug, Deserialize, Serialize)]
24pub struct Crew {
25    #[serde(flatten)]
26    pub credit: CreditCommon,
27    #[serde(flatten)]
28    pub person: PersonShort,
29    pub department: String,
30    pub job: String,
31}