[][src]Struct brawl_api::model::rankings::players::PlayerRankingClub

#[non_exhaustive]
pub struct PlayerRankingClub {
    pub name: String,
}

Represents the club in a player's ranking (a PlayerRanking object). Since the only data available at the moment is its name, it cannot be converted into a full [Club] object using a convenient method. For that, one must have the original PlayerRanking object, then convert it into a Player with Player::fetch_from.

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.
name: String

The club's name.

Methods

impl PlayerRankingClub[src]

pub fn new(name: &str) -> PlayerRankingClub[src]

Creates a new PlayerRankingClub instance with the given name.

Trait Implementations

impl Clone for PlayerRankingClub[src]

impl Debug for PlayerRankingClub[src]

impl Default for PlayerRankingClub[src]

fn default() -> PlayerRankingClub[src]

Returns an instance of PlayerRankingClub with initial values (empty name).

Examples

use brawl_api::model::PlayerRankingClub;

assert_eq!(
    PlayerRankingClub::default(),
    PlayerRankingClub::new("")
);

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

impl Eq for PlayerRankingClub[src]

impl Hash for PlayerRankingClub[src]

impl PartialEq<PlayerRankingClub> for PlayerRankingClub[src]

impl Serialize for PlayerRankingClub[src]

impl StructuralEq for PlayerRankingClub[src]

impl StructuralPartialEq for PlayerRankingClub[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.