AtomicCard

Struct AtomicCard 

Source
pub struct AtomicCard {
Show 37 fields pub ascii_name: Option<String>, pub attraction_lights: Option<Vec<u8>>, pub card_parts: Option<Vec<String>>, pub color_identity: Vec<Color>, pub color_indicator: Option<Vec<Color>>, pub colors: Vec<Color>, pub converted_mana_cost: Option<f32>, pub edhrec_rank: Option<u32>, pub face_converted_mana_cost: Option<f32>, pub face_mana_value: Option<f32>, pub face_name: Option<String>, pub foreign_data: Vec<ForeignData>, pub hand: Option<String>, pub has_alternative_deck_limit: Option<bool>, pub identifiers: Identifiers, pub is_funny: Option<bool>, pub is_reserved: Option<bool>, pub keywords: Option<Vec<String>>, pub layout: Layout, pub leadership_skills: Option<LeadershipSkills>, pub legalities: Legalities, pub life: Option<String>, pub loyalty: Option<String>, pub mana_cost: Option<String>, pub mana_value: Option<f32>, pub name: String, pub power: Option<String>, pub printings: Option<Vec<String>>, pub purchase_urls: PurchaseUrls, pub rulings: Option<Vec<Ruling>>, pub side: Option<Side>, pub subtypes: Vec<String>, pub supertypes: Vec<String>, pub text: Option<String>, pub toughness: Option<String>, pub card_type: String, pub card_types: Vec<String>,
}
Expand description

Represents a unique card, not specific to any one printing.

Fields§

§ascii_name: Option<String>

The ASCII (Basic/128) code formatted card name with no special unicode characters.

§attraction_lights: Option<Vec<u8>>

The attraction lights on the card.

§card_parts: Option<Vec<String>>

The related parts of the card.

§color_identity: Vec<Color>

A list of all the colors found in mana_cost, color_indicator, and text.

§color_indicator: Option<Vec<Color>>

A list of all the colors in the color indicator (The symbol prefixed to a card’s types).

§colors: Vec<Color>

A list of all the colors in mana_cost and color_indicator. Some cards may not have values, such as cards with “Devoid” in its text.

§converted_mana_cost: Option<f32>
👎Deprecated since 5.2.0: Will be removed in 6.0.0

The converted mana cost of the card. Use the mana_value property.

§edhrec_rank: Option<u32>

The card rank on EDHRec.

§face_converted_mana_cost: Option<f32>
👎Deprecated since 5.2.0: Will be removed in 6.0.0

The converted mana cost or mana value for the face for either half or part of the card. Use the face_mana_value property.

§face_mana_value: Option<f32>

The mana value of the face for either half or part of the card. Formally known as “converted mana cost”.

§face_name: Option<String>

The name on the face of the card.

§foreign_data: Vec<ForeignData>

A list of data properties in other languages.

§hand: Option<String>

The starting maximum hand size total modifier. A + or - character precedes an integer.

§has_alternative_deck_limit: Option<bool>

If the card allows a value other than 4 copies in a deck.

§identifiers: Identifiers

A list of identifiers associated to a card.

§is_funny: Option<bool>

If the card is part of a funny set.

§is_reserved: Option<bool>

If the card is on the Magic: The Gathering Reserved List.

§keywords: Option<Vec<String>>

A list of keywords found on the card.

§layout: Layout

The type of card layout. For a token card, this will be “token”.

§leadership_skills: Option<LeadershipSkills>

A list of formats the card is legal to be a commander in.

§legalities: Legalities

A list of play formats the card the card is legal in.

§life: Option<String>

The starting life total modifier. A plus or minus character precedes an integer. Used only on cards with “Vanguard” in its types.

§loyalty: Option<String>

The starting loyalty value of the card. Used only on cards with “Planeswalker” in its types.

§mana_cost: Option<String>

The mana cost of the card wrapped in brackets for each value.

§mana_value: Option<f32>

The mana value of the card. Formally known as “converted mana cost”.

§name: String

The name of the card. Cards with multiple faces, like “Split” and “Meld” cards are given a delimiter.

§power: Option<String>

The power of the card.

§printings: Option<Vec<String>>

A list of set printing codes the card was printed in, formatted in uppercase.

§purchase_urls: PurchaseUrls

Links that navigate to websites where the card can be purchased.

§rulings: Option<Vec<Ruling>>

The official rulings of the card.

§side: Option<Side>

The identifier of the card side. Used on cards with multiple faces on the same card.

§subtypes: Vec<String>

A list of card subtypes found after em-dash.

§supertypes: Vec<String>

A list of card supertypes found before em-dash.

§text: Option<String>

The rules text of the card.

§toughness: Option<String>

The toughness of the card.

§card_type: String

The type of the card as visible, including any supertypes and subtypes.

§card_types: Vec<String>

A list of all card types of the card, including Un‑sets and gameplay variants.

Trait Implementations§

Source§

impl Clone for AtomicCard

Source§

fn clone(&self) -> AtomicCard

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AtomicCard

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AtomicCard

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AtomicCard

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,