Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Jonathan Dallas Jones
pokerust
Commits
a60141db
Commit
a60141db
authored
3 years ago
by
Jonathan Dallas Jones
Browse files
Options
Downloads
Patches
Plain Diff
add past_damage_relations
parent
f9b64e32
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pokeapi/pokemon.rs
+9
-0
src/pokeapi/pokemon.rs
with
9 additions
and
0 deletions
src/pokeapi/pokemon.rs
+
9
−
0
View file @
a60141db
...
...
@@ -858,6 +858,7 @@ pub struct Type {
pub
names
:
Vec
<
Name
>
,
pub
pokemon
:
Vec
<
TypePokemon
>
,
pub
moves
:
Vec
<
NamedAPIResource
<
Move
>>
,
pub
past_damage_relations
:
Vec
<
PastTypeRelations
>
,
}
/// <https://pokeapi.co/docs/v2.html#typepokemon>
...
...
@@ -882,6 +883,14 @@ pub struct TypeRelations {
pub
double_damage_from
:
Vec
<
NamedAPIResource
<
Type
>>
,
}
#[derive(Serialize,
Deserialize,
Debug,
Clone,
PartialEq,
Eq,
Hash)]
#[cfg_attr(debug_assertions,
serde(deny_unknown_fields))]
#[non_exhaustive]
pub
struct
PastTypeRelations
{
pub
damage_relations
:
TypeRelations
,
pub
generation
:
NamedAPIResource
<
Generation
>
,
}
set_endpoint!
(
Ability
,
NamedAPIResourceList
,
"ability"
);
set_endpoint!
(
Characteristic
,
APIResourceList
,
"characteristic"
);
set_endpoint!
(
EggGroup
,
NamedAPIResourceList
,
"egg-group"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets