1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::card::Color;
use crate::card::ImageUris;
use super::Layout;
/// Multiface cards have a card_faces property containing at least two Card Face
/// objects.
///
/// ---
///
/// For more information, refer to the [official docs](https://scryfall.com/docs/api/cards#card-face-objects).
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
#[non_exhaustive]
#[cfg_attr(test, serde(deny_unknown_fields))]
pub struct CardFace {
/// The name of the illustrator of this card face. Newly spoiled cards may
/// not have this field yet.
pub artist: Option<String>,
/// The colors in this face’s color indicator, if any.
pub color_indicator: Option<Vec<Color>>,
/// This face’s colors, if the game defines colors for the individual face
/// of this card.
pub colors: Option<Vec<Color>>,
/// The mana value of this particular face, if the card is reversible.
pub cmc: Option<f32>,
/// The flavor text printed on this face, if any.
pub flavor_text: Option<String>,
/// A unique identifier for the card face artwork that remains consistent
/// across reprints. Newly spoiled cards may not have this field yet.
pub illustration_id: Option<Uuid>,
/// An object providing URIs to imagery for this face, if this is a
/// double-sided card. If this card is not double-sided, then the image_uris
/// property will be part of the parent object instead.
pub image_uris: Option<ImageUris>,
/// This face’s loyalty, if any.
pub loyalty: Option<String>,
/// The mana cost for this face. This value will be any empty string "" if
/// the cost is absent. Remember that per the game rules, a missing mana
/// cost and a mana cost of `{0}` are different values.
pub mana_cost: String,
/// The name of this particular face.
pub name: String,
/// The Oracle ID of this particular face, if the card is reversible.
pub oracle_id: Option<Uuid>,
/// The Oracle text for this face, if any.
pub oracle_text: Option<String>,
/// This face’s power, if any. Note that some cards have powers that are not
/// numeric, such as `*`.
pub power: Option<String>,
/// The localized name printed on this face, if any.
pub printed_name: Option<String>,
/// The localized text printed on this face, if any.
pub printed_text: Option<String>,
/// The type line as printed on the card.
pub printed_type_line: Option<String>,
/// This face’s toughness, if any. Note that some cards have powers that are not
/// numeric, such as `*`.
pub toughness: Option<String>,
/// The type line of this particular face.
pub type_line: Option<String>,
/// The watermark on this particulary card face, if any.
pub watermark: Option<String>,
/// The ID of the illustrator of this card face. Newly spoiled cards may not have this field yet.
pub artist_id: Option<Uuid>,
/// The just-for-fun name printed on the card (such as for Godzilla series cards).
pub flavor_name: Option<String>,
/// This face’s defense, if it's a battle.
pub defense: Option<String>,
/// The layout of this card face, if the card is reversible.
pub layout: Option<Layout>,
#[cfg(test)]
#[serde(rename = "object")]
_object: String,
}