pub struct Pokemon {
Show 18 fields pub id: Option<i64>, pub name: Option<String>, pub base_experience: Option<i64>, pub height: Option<i64>, pub is_default: Option<bool>, pub order: Option<i64>, pub weight: Option<i64>, pub abilities: Option<Vec<PokemonAbility>>, pub forms: Option<Vec<NamedApiResource<PokemonForm>>>, pub game_indices: Option<Vec<VersionGameIndex>>, pub held_items: Option<Vec<PokemonHeldItem>>, pub location_area_encounters: Option<String>, pub moves: Option<Vec<PokemonMove>>, pub past_types: Option<Vec<PokemonTypePast>>, pub sprites: Option<PokemonSprites>, pub species: Option<NamedApiResource<PokemonSpecies>>, pub stats: Option<Vec<PokemonStat>>, pub types: Option<Vec<PokemonType>>,
}
Expand description

Fields

id: Option<i64>

The identifier for this resource.

name: Option<String>

The name for this resource.

base_experience: Option<i64>

The base experience gained for defeating this Pokémon.

height: Option<i64>

The height of this Pokémon in decimetres.

is_default: Option<bool>

Set for exactly one Pokémon used as the default for each species.

order: Option<i64>

Order for sorting. Almost national order, except families are grouped together.

weight: Option<i64>

The weight of this Pokémon in hectograms.

abilities: Option<Vec<PokemonAbility>>

A list of abilities this Pokémon could potentially have.

forms: Option<Vec<NamedApiResource<PokemonForm>>>

A list of forms this Pokémon can take on.

game_indices: Option<Vec<VersionGameIndex>>

A list of game indices relevent to Pokémon item by generation.

held_items: Option<Vec<PokemonHeldItem>>

A list of items this Pokémon may be holding when encountered.

location_area_encounters: Option<String>

A link to a list of location areas, as well as encounter details pertaining to specific versions.

moves: Option<Vec<PokemonMove>>

A list of moves along with learn methods and level details pertaining to specific version groups.

past_types: Option<Vec<PokemonTypePast>>

A list of details showing types this pokémon had in previous generations.

sprites: Option<PokemonSprites>

A set of sprites used to depict this Pokémon in the game. A visual representation of the various sprites can be found at PokeAPI/sprites.

species: Option<NamedApiResource<PokemonSpecies>>

The species this Pokémon belongs to.

stats: Option<Vec<PokemonStat>>

A list of base stat values for this Pokémon.

types: Option<Vec<PokemonType>>

A list of details showing types this Pokémon has.

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

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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.

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

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self

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.

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

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