#[non_exhaustive]
pub enum CharacterCard {
Show 27 variants KamisatoAyaka, Chongyun, Diona, Ganyu, Kaeya, Barbara, Mona, Xingqiu, Cyno, Fischl, Keqing, Razor, Ningguang, Noelle, Collei, Jean, Sucrose, Bennett, Diluc, Xiangling, Yoimiya, MirrorMaiden, RhodeiaOfLoch, StonehideLawachurl, JadeplumeTerrorshroom, MaguuKenki, FatuiPyroAgent,
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

KamisatoAyaka

§

Chongyun

§

Diona

§

Ganyu

§

Kaeya

§

Barbara

§

Mona

§

Xingqiu

§

Cyno

§

Fischl

§

Keqing

§

Razor

§

Ningguang

§

Noelle

§

Collei

§

Jean

§

Sucrose

§

Bennett

§

Diluc

§

Xiangling

§

Yoimiya

§

MirrorMaiden

§

RhodeiaOfLoch

§

StonehideLawachurl

§

JadeplumeTerrorshroom

§

MaguuKenki

§

FatuiPyroAgent

Implementations§

Examples found in repository?
src/cards/mod.rs (line 23)
21
22
23
24
25
26
    pub fn name(&self) -> &'static str {
        match self {
            Self::Character(card) => card.name(),
            Self::Action(card)    => card.name(),
        }
    }
More examples
Hide additional examples
src/deck.rs (line 113)
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let errstr = match self {
            Self::TalentRequiresCharacter(card) => {
                let talent_name = card.name();
                let char_name = card.character().name();

                format!("`{talent_name}` requires `{char_name}` to be present in the deck")
            },
            Self::CharacterAppearsMoreThanOnce(card) => {
                let char_name = card.name();

                format!("deck contains more than one `{char_name}`")
            },
            Self::ActionCardAppearsMoreThanTwice(card) => {
                let card_name = card.name();

                format!("deck contains more than two `{card_name}`")
            },
            Self::TooManyCharacterCards => "deck has more than three character cards".into(),
            Self::TooManyActionCards => "deck has more than 30 action cards".into(),
            Self::NotEnoughCharacterCards(x) => {
                format!("decks require 3 character cards, only retrieved {x}")
            },
            Self::NotEnoughActionCards(x) => {
                format!("decks require 30 action cards, only retrieved {x}")
            },
        };
        
        write!(f, "{errstr}")
    }

The weapon type this character can hold

Returns None for characters listed as “Other Weapon”

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.