[][src]Struct brawl_api::model::players::battlelog::BattleBrawler

pub struct BattleBrawler {
    pub id: usize,
    pub name: String,
    pub power: u8,
    pub trophies: usize,
}

Represents the brawler a player was using in a BattlePlayer object.

Fields

id: usize

The brawler's id (an arbitrary number).

name: String

The brawler's name (e.g. "PENNY", "ROSA", "BROCK"...)

power: u8

The brawler's power (1-10).

trophies: usize

Trait Implementations

impl Clone for BattleBrawler[src]

impl Debug for BattleBrawler[src]

impl Default for BattleBrawler[src]

fn default() -> BattleBrawler[src]

Returns an instance of BattleBrawler with initial values.

Examples

use brawl_api::BattleBrawler;

assert_eq!(
    BattleBrawler::default(),
    BattleBrawler {
        id: 0,
        name: String::from(""),
        power: 1,
        trophies: 0,
    }
);

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

impl Eq for BattleBrawler[src]

impl FetchFrom<BattleBrawler> for Brawler[src]

fn fetch_from(client: &Client, b_brawler: &BattleBrawler) -> Result<Brawler>[src]

(Sync) Attempts to fetch a Brawler from an existing BattleBrawler instance.

fn a_fetch_from<'life0, 'life1, 'async_trait>(
    client: &'life0 Client,
    b_brawler: &'life1 BattleBrawler
) -> Pin<Box<dyn Future<Output = Result<Brawler>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait, 
[src]

(Async) Attempts to fetch a Brawler from an existing BattleBrawler instance.

impl Hash for BattleBrawler[src]

impl PartialEq<BattleBrawler> for BattleBrawler[src]

impl Serialize for BattleBrawler[src]

impl StructuralEq for BattleBrawler[src]

impl StructuralPartialEq for BattleBrawler[src]

Auto Trait Implementations

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> FetchFrom<T> for T where
    T: Clone + Send + Sync
[src]

fn fetch_from(&Client, &T) -> Result<T, Error>[src]

(Sync) Returns a copy of the current instance when attempting to fetch from itself. In order to re-fetch, see Refetchable.

Errors

Never errors; is only a Result in order to match the trait signature.

fn a_fetch_from<'life0, 'life1, 'async_trait>(
    &'life0 Client,
    &'life1 T
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    T: 'async_trait, 
[src]

(Async) Returns a copy of the current instance when attempting to fetch from itself. In order to re-fetch, see Refetchable.

Errors

Never errors; is only a Result in order to match the trait signature.

impl<T, U> FetchInto<U> for T where
    T: Sync + Send,
    U: FetchFrom<T> + Sync + Send
[src]

impl<T> From<T> for T[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.