pub trait PlayingCard: Trait {
Show 15 methods
// Required methods
fn name(&self) -> &'static str;
fn cost(&self) -> CardCost;
fn shop_price(&self) -> Option<u16>;
// Provided methods
fn equipment(&self) -> Option<EquipmentCard> { ... }
fn event(&self) -> Option<EventCard> { ... }
fn support(&self) -> Option<SupportCard> { ... }
fn artifact(&self) -> Option<ArtifactCard> { ... }
fn talent(&self) -> Option<TalentCard> { ... }
fn weapon(&self) -> Option<WeaponCard> { ... }
fn food(&self) -> Option<FoodCard> { ... }
fn companion(&self) -> Option<CompanionCard> { ... }
fn item(&self) -> Option<ItemCard> { ... }
fn location(&self) -> Option<LocationCard> { ... }
fn resonance(&self) -> Option<ElementalResonanceCard> { ... }
fn normal_event(&self) -> Option<NormalEventCard> { ... }
}Required Methods§
Sourcefn shop_price(&self) -> Option<u16>
fn shop_price(&self) -> Option<u16>
Returns the price for buying this card in Prince’s shop (in Lucky Coins)
If this card is not obtainable from the shop (such as talent cards
or Paimon), returns None
Provided Methods§
Sourcefn equipment(&self) -> Option<EquipmentCard>
fn equipment(&self) -> Option<EquipmentCard>
Attempts to parse self as
an
equipment
card. Returns None if this card is of another type/subtype
Sourcefn event(&self) -> Option<EventCard>
fn event(&self) -> Option<EventCard>
Attempts to parse self as
an
event
card. Returns None if this card is of another type/subtype
Sourcefn support(&self) -> Option<SupportCard>
fn support(&self) -> Option<SupportCard>
Attempts to parse self as
a
support
card. Returns None if this card is of another type/subtype
Sourcefn artifact(&self) -> Option<ArtifactCard>
fn artifact(&self) -> Option<ArtifactCard>
Attempts to parse self as
an
artifact
card. Returns None if this card is of another type/subtype
Sourcefn talent(&self) -> Option<TalentCard>
fn talent(&self) -> Option<TalentCard>
Attempts to parse self as
a
talent
card. Returns None if this card is of another type/subtype
Sourcefn weapon(&self) -> Option<WeaponCard>
fn weapon(&self) -> Option<WeaponCard>
Attempts to parse self as
a
weapon
card. Returns None if this card is of another type/subtype
Sourcefn food(&self) -> Option<FoodCard>
fn food(&self) -> Option<FoodCard>
Attempts to parse self as
a
food
card. Returns None if this card is of another type/subtype
Sourcefn companion(&self) -> Option<CompanionCard>
fn companion(&self) -> Option<CompanionCard>
Attempts to parse self as
a
companion
card. Returns None if this card is of another type/subtype
Sourcefn item(&self) -> Option<ItemCard>
fn item(&self) -> Option<ItemCard>
Attempts to parse self as
an
item
card. Returns None if this card is of another type/subtype
Sourcefn location(&self) -> Option<LocationCard>
fn location(&self) -> Option<LocationCard>
Attempts to parse self as
a
location
card. Returns None if this card is of another type/subtype
Sourcefn resonance(&self) -> Option<ElementalResonanceCard>
fn resonance(&self) -> Option<ElementalResonanceCard>
Attempts to parse self as
a
resonance
card. Returns None if this card is of another type/subtype
Sourcefn normal_event(&self) -> Option<NormalEventCard>
fn normal_event(&self) -> Option<NormalEventCard>
Attempts to parse self as a normal event card (non-food and non-resonance).
Returns None if this card is of another type/subtype