#[repr(u8)]pub enum Tier {
CHALLENGER = 220,
GRANDMASTER = 200,
MASTER = 180,
DIAMOND = 140,
EMERALD = 130,
PLATINUM = 120,
GOLD = 100,
SILVER = 80,
BRONZE = 60,
IRON = 40,
UNRANKED = 0,
}
Expand description
LoL and TFT ranked tiers, such as gold, diamond, challenger, etc.
Sorts from lowest rank to highest rank.
Repr’d as arbitrary u8
values.
Implements IntoEnumIterator.
Variants§
CHALLENGER = 220
Challenger, the highest tier, an apex tier. Repr: 220_u8
.
GRANDMASTER = 200
Grand Master, an apex tier. Repr: 200_u8
.
MASTER = 180
Master, an apex tier. Repr: 180_u8
.
DIAMOND = 140
Diamond, the higest non-apex tier. Repr: 140_u8
.
EMERALD = 130
Emerald. Added in 2023. Repr: 130_u8
.
PLATINUM = 120
Platinum. Repr: 120_u8
.
GOLD = 100
Gold. Repr: 100_u8
.
SILVER = 80
Silver. Repr: 80_u8
.
BRONZE = 60
Bronze. Repr: 60_u8
.
IRON = 40
Iron, the lowest tier. Repr: 40_u8
.
UNRANKED = 0
Unranked, no tier. Repr: 0_u8
.
Also deserializes from “NONE” returned by lol-challenges-v1.getChallengePercentiles
.
Implementations§
source§impl Tier
impl Tier
sourcepub const fn is_apex(self) -> bool
pub const fn is_apex(self) -> bool
If this tier is an apex tier: Self::MASTER
, Self::GRANDMASTER
,
or Self::CHALLENGER
. Returns false for Self::UNRANKED
.
These tiers are NOT queryable by LeagueV4Endpoints::get_league_entries(…).
sourcepub fn is_standard(self) -> bool
pub fn is_standard(self) -> bool
If this tier is a “standard” tier: iron through diamond. Returns false for unranked.
ONLY these tiers are queryable by LeagueV4::get_league_entries(...)
.
sourcepub const fn is_ranked(self) -> bool
pub const fn is_ranked(self) -> bool
If this tier is ranked. Returns true for iron through challenger, false for unranked.
sourcepub const fn is_unranked(self) -> bool
pub const fn is_unranked(self) -> bool
If this tier is unranked (Tier::UNRANKED
).
UNRANKED is returned by Participant.highest_achieved_season_tier
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Tier
impl<'de> Deserialize<'de> for Tier
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl IntoEnumIterator for Tier
impl IntoEnumIterator for Tier
Returns a DoubleEndedIterator of I, II, III, IV. Ordered from high rank (I) to low (IV). Excludes V, which is deprecated.
source§impl Ord for Tier
impl Ord for Tier
source§impl PartialEq for Tier
impl PartialEq for Tier
source§impl PartialOrd for Tier
impl PartialOrd for Tier
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<u8> for Tier
impl TryFrom<u8> for Tier
§type Error = TryFromPrimitiveError<Tier>
type Error = TryFromPrimitiveError<Tier>
source§impl TryFromPrimitive for Tier
impl TryFromPrimitive for Tier
impl Copy for Tier
impl Eq for Tier
impl StructuralPartialEq for Tier
Auto Trait Implementations§
impl Freeze for Tier
impl RefUnwindSafe for Tier
impl Send for Tier
impl Sync for Tier
impl Unpin for Tier
impl UnwindSafe for Tier
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.