[][src]Struct pokerust::Pokemon

#[non_exhaustive]
pub struct Pokemon {
    pub id: i16,
    pub name: String,
    pub base_experience: u16,
    pub height: u8,
    pub is_default: bool,
    pub order: u16,
    pub weight: u16,
    pub abilities: Vec<PokemonAbility>,
    pub forms: Vec<NamedAPIResource<PokemonForm>>,
    pub game_indices: Vec<VersionGameIndex>,
    pub held_items: Vec<PokemonHeldItem>,
    pub location_area_encounters: String,
    pub moves: Vec<PokemonMove>,
    pub sprites: PokemonSprites,
    pub species: NamedAPIResource<PokemonSpecies>,
    pub stats: Vec<PokemonStat>,
    pub types: Vec<PokemonType>,
}

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
id: i16name: Stringbase_experience: u16height: u8is_default: boolorder: u16weight: u16abilities: Vec<PokemonAbility>forms: Vec<NamedAPIResource<PokemonForm>>game_indices: Vec<VersionGameIndex>held_items: Vec<PokemonHeldItem>location_area_encounters: Stringmoves: Vec<PokemonMove>sprites: PokemonSpritesspecies: NamedAPIResource<PokemonSpecies>stats: Vec<PokemonStat>types: Vec<PokemonType>

Methods

impl Pokemon[src]

pub fn get_encounters(&self) -> Result<Vec<LocationAreaEncounter>, Error>[src]

Fetch list of LocationAreaEncounters from the API for this Pokemon.

Trait Implementations

impl Clone for Pokemon[src]

impl Debug for Pokemon[src]

impl<'de> Deserialize<'de> for Pokemon[src]

impl Endpoint for Pokemon[src]

type ResourceListKind = NamedAPIResourceList<Pokemon>

impl Eq for Pokemon[src]

impl Hash for Pokemon[src]

impl Id for Pokemon[src]

impl Named for Pokemon[src]

impl PartialEq<Pokemon> for Pokemon[src]

impl Serialize for Pokemon[src]

impl StructuralEq for Pokemon[src]

impl StructuralPartialEq for Pokemon[src]

Auto Trait Implementations

impl RefUnwindSafe for Pokemon

impl Send for Pokemon

impl Sync for Pokemon

impl Unpin for Pokemon

impl UnwindSafe for Pokemon

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T> FromId for T where
    T: Endpoint + Id + DeserializeOwned
[src]

impl<T> FromName for T where
    T: Endpoint + Named + DeserializeOwned
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.