Struct Card

Source
pub struct Card {
Show 28 fields pub id: String, pub name: String, pub supertype: String, pub subtypes: Option<Vec<String>>, pub level: Option<String>, pub hp: Option<String>, pub types: Option<Vec<String>>, pub evolves_from: Option<String>, pub evolves_to: Option<Vec<String>>, pub rules: Option<Vec<String>>, pub ancient_trait: Option<AncientTrait>, pub abilities: Option<Vec<Ability>>, pub attacks: Option<Vec<Attack>>, pub weaknesses: Option<Vec<Weakness>>, pub resistances: Option<Vec<Resistance>>, pub retreat_cost: Option<Vec<String>>, pub converted_retreat_cost: Option<usize>, pub set: Set, pub number: Option<String>, pub artist: Option<String>, pub rarity: Option<String>, pub flavor_text: Option<String>, pub national_pokedex_numbers: Option<Vec<usize>>, pub legalities: Option<Legality>, pub regulation_mark: Option<String>, pub images: Option<Image>, pub tcgplayer: Option<TcgPlayer>, pub cardmarket: Option<CardMarket>,
}
Expand description

The Card Object https://docs.pokemontcg.io/api-reference/cards/card-object

Fields§

§id: String

Unique identifier for the object.

§name: String

The name of the card.

§supertype: String

The supertype of the card, such as Pokémon, Energy, or Trainer.

§subtypes: Option<Vec<String>>

A list of subtypes, such as Basic, EX, Mega, Rapid Strike, etc.

§level: Option<String>

The level of the card. This only pertains to cards from older sets and those of supertype Pokémon.

§hp: Option<String>

The hit points of the card.

§types: Option<Vec<String>>

The energy types for a card, such as Fire, Water, Grass, etc.

§evolves_from: Option<String>

Which Pokémon this card evolves from.

§evolves_to: Option<Vec<String>>

Which Pokémon this card evolves to. Can be multiple, for example, Eevee.

§rules: Option<Vec<String>>

Any rules associated with the card. For example, VMAX rules, Mega rules, or various trainer rules.

§ancient_trait: Option<AncientTrait>

The ancient trait for a given card.

§abilities: Option<Vec<Ability>>

One or more abilities for a given card.

§attacks: Option<Vec<Attack>>

One or more attacks for a given card

§weaknesses: Option<Vec<Weakness>>

One or more weaknesses for a given card

§resistances: Option<Vec<Resistance>>

One or more resistances for a given card

§retreat_cost: Option<Vec<String>>

A list of costs it takes to retreat and return the card to your bench. Each cost is an energy type, such as Water or Fire.

§converted_retreat_cost: Option<usize>

The converted retreat cost for a card is the count of energy types found within the retreatCost field. For example, [“Fire”, “Water”] has a converted retreat cost of 2.

§set: Set

The set details embedded into the card. See the set object for more details.

§number: Option<String>

The number of the card.

§artist: Option<String>

The artist of the card.

§rarity: Option<String>

The rarity of the card, such as “Common” or “Rare Rainbow”.

§flavor_text: Option<String>

The flavor text of the card. This is the text that can be found on some Pokémon cards that is usually italicized near the bottom of the card.

§national_pokedex_numbers: Option<Vec<usize>>

The national pokedex numbers associated with any Pokémon featured on a given card.

§legalities: Option<Legality>

The legalities for a given card. A legality will not be present in the hash if it is not legal. If it is legal or banned, it will be present.

§regulation_mark: Option<String>

A letter symbol found on each card that identifies whether it is legal to use in tournament play. Regulation marks were introduced on cards in the Sword & Shield Series.

§images: Option<Image>

The images for a card.

§tcgplayer: Option<TcgPlayer>

The TCGPlayer information for a given card. ALL PRICES ARE IN US DOLLARS.

§cardmarket: Option<CardMarket>

The cardmarket information for a given card. ALL PRICES ARE IN EUROS.

Trait Implementations§

Source§

impl Clone for Card

Source§

fn clone(&self) -> Card

Returns a copy 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 Card

Source§

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

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

impl<'de> Deserialize<'de> for Card

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 Card

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§

§

impl Freeze for Card

§

impl RefUnwindSafe for Card

§

impl Send for Card

§

impl Sync for Card

§

impl Unpin for Card

§

impl UnwindSafe for Card

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, dst: *mut u8)

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T