pub struct UserData {
pub id: String,
pub kind: String,
pub children: Vec<Season>,
pub metadata: Metadata,
pub stats: Vec<Stat>,
pub unknown: HashMap<String, Value>,
}
Fields§
§id: String
Unique user id
kind: String
§children: Vec<Season>
Collection of ranked seasons stats
metadata: Metadata
Metadata
stats: Vec<Stat>
A collection of all stats
unknown: HashMap<String, Value>
Unknown fields
Implementations§
source§impl UserData
impl UserData
sourcepub fn current_mmr(&self) -> Option<u32>
pub fn current_mmr(&self) -> Option<u32>
Gets top mmr from all servers.
sourcepub fn current_mmr_image(&self) -> Option<&Url>
pub fn current_mmr_image(&self) -> Option<&Url>
Get the image url for the rank this user is at gloablly
sourcepub fn current_mmr_america(&self) -> Option<u32>
pub fn current_mmr_america(&self) -> Option<u32>
Get the MMR for this user.
sourcepub fn season_color(&self) -> &str
pub fn season_color(&self) -> &str
Gets this season’s color as a string hex value
sourcepub fn season_color_u32(&self) -> Option<u32>
pub fn season_color_u32(&self) -> Option<u32>
Tries to parse this season’s hex color as a u32
sourcepub fn get_deaths(&self) -> Option<u64>
pub fn get_deaths(&self) -> Option<u64>
Get total # of deaths
sourcepub fn avatar_url(&self) -> &Url
pub fn avatar_url(&self) -> &Url
Get user avatar url
sourcepub fn get_latest_season(&self) -> Option<&Season>
pub fn get_latest_season(&self) -> Option<&Season>
Get the latest stats for the latest ranked region/season the user has played in
sourcepub fn get_max_season(&self) -> Option<&Season>
pub fn get_max_season(&self) -> Option<&Season>
Get the season where the user attained their max ranking
Trait Implementations§
source§impl<'de> Deserialize<'de> for UserData
impl<'de> Deserialize<'de> for UserData
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for UserData
impl Send for UserData
impl Sync for UserData
impl Unpin for UserData
impl UnwindSafe for UserData
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
Mutably borrows from an owned value. Read more