[−][src]Struct brawl_api::model::rankings::clubs::ClubRanking
Represents a club's ranking, based on a regional or global leaderboard.
To obtain the club's full data (a Club
instance), see Club::fetch_from
.
Fields
tag: String
The club's tag.
name: String
The club's name.
trophies: usize
The club's current trophies.
rank: u8
The club's current rank in the leaderboard.
member_count: usize
The amount of members in this club.
Trait Implementations
impl Clone for ClubRanking
[src]
fn clone(&self) -> ClubRanking
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ClubRanking
[src]
impl Default for ClubRanking
[src]
fn default() -> ClubRanking
[src]
Returns an instance of ClubRanking
with initial values.
Examples
use brawl_api::ClubRanking; assert_eq!( ClubRanking::default(), ClubRanking { tag: String::from(""), name: String::from(""), trophies: 0, rank: 1, member_count: 0, } );
impl<'de> Deserialize<'de> for ClubRanking
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for ClubRanking
[src]
impl FetchFrom<ClubRanking> for Club
[src]
fn fetch_from(client: &Client, c_ranking: &ClubRanking) -> Result<Club>
[src]
(Sync) Fetches a Club
using data from a ClubRanking
object.
fn a_fetch_from<'life0, 'life1, 'async_trait>(
client: &'life0 Client,
c_ranking: &'life1 ClubRanking
) -> Pin<Box<dyn Future<Output = Result<Club>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
[src]
client: &'life0 Client,
c_ranking: &'life1 ClubRanking
) -> Pin<Box<dyn Future<Output = Result<Club>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
(Async) Fetches a Club
using data from a ClubRanking
object.
impl Hash for ClubRanking
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ClubRanking
[src]
fn cmp(&self, other: &ClubRanking) -> Ordering
[src]
Compares and determines which ClubRanking
has a higher rank (i.e., smaller rank number).
Examples
use brawl_api::{ClubLeaderboard, traits::*}; let leaderboard: ClubLeaderboard; // after fetching the leaderboard (see examples in ClubLeaderboard::fetch)... let (club_1, club_2) = (&leaderboard[0], &leaderboard[1]); // generally, the first club is the one with 'rank' field equal to 1 and the second, // 'rank' field equal to 2, so assume this is true (the API generally sends them sorted, // but, to guarantee strictness, one can 'leaderboard.sort()'. assert!(club_1 > club_2) // smaller rank number = higher position
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ClubRanking> for ClubRanking
[src]
fn eq(&self, other: &ClubRanking) -> bool
[src]
fn ne(&self, other: &ClubRanking) -> bool
[src]
impl PartialOrd<ClubRanking> for ClubRanking
[src]
fn partial_cmp(&self, other: &ClubRanking) -> Option<Ordering>
[src]
Compares and determines which ClubRanking
has a higher rank (i.e., smaller rank number).
Examples
use brawl_api::{ClubLeaderboard, traits::*}; let leaderboard: ClubLeaderboard; // after fetching the leaderboard (see examples in ClubLeaderboard::fetch)... let (club_1, club_2) = (&leaderboard[0], &leaderboard[1]); // generally, the first club is the one with 'rank' field equal to 1 and the second, // 'rank' field equal to 2, so assume this is true (the API generally sends them sorted, // but, to guarantee strictness, one can 'leaderboard.sort()'. assert!(club_1 > club_2) // smaller rank number = higher position
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for ClubRanking
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for ClubRanking
[src]
impl StructuralPartialEq for ClubRanking
[src]
Auto Trait Implementations
impl RefUnwindSafe for ClubRanking
impl Send for ClubRanking
impl Sync for ClubRanking
impl Unpin for ClubRanking
impl UnwindSafe for ClubRanking
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> FetchFrom<T> for T where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
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]
&'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,
(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]
T: Sync + Send,
U: FetchFrom<T> + Sync + Send,
fn fetch_into(&Self, &Client) -> Result<U, Error>
[src]
fn a_fetch_into<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 Client
) -> Pin<Box<dyn Future<Output = Result<U, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
U: 'async_trait,
[src]
&'life0 Self,
&'life1 Client
) -> Pin<Box<dyn Future<Output = Result<U, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
U: 'async_trait,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,